Forum Replies Created

Viewing 15 posts - 1 through 15 (of 34 total)

  • RE: Using IN in a where clause from ASP .net

    Sorry but it doesn't work the way you assume,  in your example,  @codeList can only be a single value not a list.  There are a few options:

    if you know that...

  • RE: rewrite code to eliminate isnull

    I can't believe that there is a general performance problem with ISNULL as it would have been spotted long ago.  I have never had any trouble with it and I...

  • RE: Queue processing -- MAX, correlated subquery and self-joins: which is best?

     

    Hi, 

    I have a couple of idea but I need a bit of clarification.

    If, in your example you miss out the line

    INSERT INTO #Queue VALUES(2,...

  • RE: using a sub sql with expression

    It is possible as I demonstrate below but it is not the recommended way to get a unique incrementing serial number.  What you want is an IDENTITY column.

    An Identity...

  • RE: Database Migration Methodology Questions

    I agree with Steve that you won't get any problems with the backup/restore of user database as both servers are using the same version. 

    If you have a lot of users and/or databases...

  • RE: Text Parsing TSQL code

    No,  what you want to do can't be done with SQL2000.  You would need to join your 'inpt table' to the output from the function. 

    Apparently the next release of SQL...

  • RE: need help with ms-access joins

    Try bulding tehj queries graphically with MS Query Builder and then click the 'SQL' button to see how it is done.

    Query Builder installs with Excel amongst other things. Run the executable...

  • RE: need help with T-SQL Syntax

    For efficient processing this is best done using a table rather than comma delimited string.

    If you call the sp from t-sql then create a table variable and pass that instead.

    I...

  • RE: To de-nomalize or not

    You need 2 lookup's.  One to display all employees when showing the form, and another which is restricted by is current for when the user picks one. 

    You could also...

  • RE: SQL Query Help

    Hi,

    Not really sure waht you want but I'll guess anyway.

    Select   T1.field1,

               T1.field2,

               T1,field2,

               T2.field1, -- probably don't need

              T2.field2, -- these bits

              T2,field4

    from   table1 T1

    join    table2 T2

    on     T1.field1...

  • RE: sp_renamedb

    The database is in use which is why you can't rename it.  The following statement will kill all users from the database (rolling back all transactions) and put the database...

  • RE: Slow performance on large inserts

    Yes,  SQL Profiler is the right tool to use next.

    The easiest way to use is start with the default options and add bits and pieces to it until you get the...

  • RE: Transaction Deadlock Error

    Arran, the dates in the query will work OK because SQL implicitly converts then back to dates to compare with the sd.gldate column which is...

  • RE: What is the maximum length for a varchar field?

    Yes,  it is 8000 chars now.  You must have an old book as this was the limit in SQL 6.5.

    nvarchar is limited to 4000 chars as each char takes 2...

  • RE: Convert getdate() to date only

    I've not seen that solution before.  It is rather neat and it should be OK.

    The way I've been doing it is:

    declare @date as...

Viewing 15 posts - 1 through 15 (of 34 total)