Forum Replies Created

Viewing 5 posts - 16 through 20 (of 20 total)

  • RE: WHILE Statement with CURSOR

    If I understand correctly, you want to bump @from_dt by one day.  So say @from_date = 1/31/2005, you would want fiscal_day to be 1 (as in 2/1/2005) not 32.

    If that's...

  • RE: windows clipboard

    Well, I'm not quite sure what you mean "do it in SQL Server".  Do you have RTF text stored in a field and are trying to turn it into plain...

  • RE: Using SQL CASE statement in Crystal Reports

    I wonder if Crystal is having a problem determing the field type for the case field because the ELSE clause returns NULL.  Can you have the ELSE return a valid...

  • RE: Find missing numbers in sequential column

    This is way too much fun.

    I have an unnatural aversion to temp tables and an equally unnatural propensity for clever querying.

    SELECT
    MinRange = (SELECT ISNULL(MAX(subA.TheKey),0)+1...
  • RE: Find missing numbers in sequential column

    Just for fun, here's another variation on the first answer:

    SELECT

       Key+1

    FROM

       MyTable 

    WHERE

        --The next # is missing

       Key+1 NOT IN (SELECT Key FROM MyTable)

    AND

       --We haven't reached the max of...

Viewing 5 posts - 16 through 20 (of 20 total)