Forum Replies Created

Viewing 15 posts - 57,691 through 57,705 (of 59,048 total)

  • RE: SQL 2000, IN clause, and soft order...

    Michael,

    That means that, using Sreejith's fine example, your code should look something like this...

    select * from aTable WHERE anID IN (7,8,9,1,10,6) <--passed variable
    order by CHARINDEX(anID,@passedvariable)
  • RE: SQL 2000, IN clause, and soft order...

    I'm just gonna take a guess and say that you didn't actually try it Gopi... works fine from what I can see...

    stor_id stor_name             stor_address          city         state zip  

    -------...

  • RE: using CHARINDEX in SUBSTRING, need start and end

    Sorry... missed the fact that you used "9" as the starting point in the CHARINDEX...

    Works great if the prefix is always "Watch" or some other combo of 5 letters... if...

  • RE: How to get paged data using t-sql

    Shoot... these type of paging routines are so much easier in 2005 with TOP @variable...

  • RE: How to get paged data using t-sql

    I see what you mean, now... I gotta do some tweekin' because page 0 now sets ROWCOUNT = 0 and the last page takes forever... I'll let you know what...

  • RE: How to get paged data using t-sql

    Haven't tried any of this using a temp table... what changes do you suggest?

  • RE: How to get paged data using t-sql

    Almost forgot... the routine starts with PAGE 0... you can certainly "fix" that by subtracting 1 for the page parameter or by passing in a pre-decremented page number.

  • RE: How to get paged data using t-sql

    Not sure about the performance of your proc but the following will return the first page of 100 almost instantly and returns the 12,000th page of a 40 column, 1.2 million...

  • RE: item counting

    One measurement is worth a thousand words... also I tried to make some unique table names, be careful folks... this test does delete some tables... didn't want to run anyone's...

  • RE: item counting

    Nagabhushanam,

    That works great in SQL Server 2005 but has no chance of working in SQL Server 2000.  Good to see how this works, though.

  • RE: How to know when a field has been modified in the table

    Take a look at the COLUMNS_UPDATED feature of a trigger and make your Audit table look something like this...

    AuditID ModDate ModBy TableName ColumnName NewValue (OldValue)

    ... I put OldValue in...

  • RE: How to Translate UTC dates to local Dates?

    VERY nicely done... VERY easy to read and the comments are just right... What do the contents of the tblRefTimeZone look like and where do folks get that info...

  • RE: INSERTING COLUMNS

    Actually, you'll need quite a few other scripts if there are indexes, foreign keys, and triggers.  That's why I use EM to take care of it... it "automagically" does all...

  • RE: using CHARINDEX in SUBSTRING, need start and end

    Nope... couldn't do that because the first underscore will interfere with finding the second underscore.

Viewing 15 posts - 57,691 through 57,705 (of 59,048 total)