Forum Replies Created

Viewing 15 posts - 826 through 840 (of 1,086 total)

  • RE: Dynamic IN Clause

    I said easiest  -not best.    (I agree with using a split function). 

  • RE: Dynamic IN Clause

    I do not know how much and where you are using this, but the easiest way to get a return would be: 

    DECLARE @sql varchar(20)
    SET @sql = CHAR(39) +...
  • RE: Better way to do this?

    It sounds like you do not need the Index hint.  Do you have and index on Employee.hzip? 

    Between can be a difficulty especially since a zip code cannot be numeric. ...

  • RE: Better way to do this?

    Definately try it without the Index hint.  You could also try putting parenthesis around the (INDEX = IX_Zip).

  • RE: Better way to do this?

    You could try this: 

    UPDATE dbo.EMPLOYEE SET

              CongDist = dbo.Ranged.CongDist

    FROM dbo.Ranged

         INNER JOIN dbo.Employee ON( dbo.Employee.hzip = dbo.Ranged.ZIP

              AND( dbo.Employee.hzip4 BETWEEN dbo.Ranged.Start AND dbo.Ranged.Stop)

    INDEX =...

  • RE: Execute a SQL with more than 8000 in length

    You should be able to do it with 2 @Variables.  Here is a very long proof, because I wanted to make sure 8000 characters were captured in both @Variables. 

     

    CREATE...

  • RE: Multiple rows into 1 column

    Check this thread out and see if it helps. 

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=182229 

     

    This might be overkill.  I over-interpretted what you wanted.  I think Carl...

  • RE: Help with Query

    Can you give me a print out of some data?  I am too lazy to make my own to veryify what works...  Thanks

  • RE: SQL CHAR field question

    A WHILE loop will probably take longer, although the function will still have walk through each record to get the output you want. 

    I coded mine specifically so the function-like...

  • RE: Help with Query

    If I understand you correctly, a set of records which have the same SerialNbrID will have one record with a  value in QtyNonSale and and a NULL in QtyOnHand and the...

  • RE: Read Uncommitted Problem: Dont want read from memory

    You could, as a kludge, make another table of the same structure and insert the original values there and use that information for Process B?  You would have to TRUNCATE...

  • RE: SQL CHAR field question

    I tried this without the UDF (basically the UDF is the second WHILE is the UDF).  It looks long, but if you made the UDF, it should be relatively short......

  • RE: Cursor removal question.

    It looks like this is already set up to use a WHILE loop. 

     

    WHILE @li_counter <= @previous_li_counter  [you may have to drop the setting of @il_counter to zero and make...

  • RE: Switching from YYYYMMDD to MMDDYYYY

    I get the desired result when I try this.  Add this extra step and see what you are presented. 

    SELECT CONVERT( varchar, CONVERT( datetime, '20050522'), 101) 

  • RE: adding column to an existing unique key constraint

    Thanks Remi.  I was unaware of WITH DROP_EXISTING. 

Viewing 15 posts - 826 through 840 (of 1,086 total)