Forum Replies Created

Viewing 15 posts - 58,306 through 58,320 (of 59,053 total)

  • RE: compute results

    Zia,

    Instead of using COMPUTE, consider using WITH ROLLUP or WITH CUBE.  There's some great documentation on how to exploit the related GROUPING sub-totals for ROLLUP and CUBE in Books OnLine under...

  • RE: Full date given week date part and year

    Dave,

    Very volitile subject... I got involved with a pretty big discussion on this subject before and I'll just say that, in all the "million-row" testing I did, I satisfied myself that properly...

  • RE: speed up LEN(RTRIM(LTRIM(ERR))) > 0????

    They say that one test is worth a thousand calculations and a million guesses... Noeld is correct.  But don't take my word for it... I expanded my normally well behaved...

  • RE: Full date given week date part and year

    Very nice... very nice indeed...

    These might execute a bit quicker... in fact, considering that they're single line formulas, you may not want to use them as functions, at all.. just...

  • RE: Help me with this t-sql

    For the data presented, this'll do it... and it doesn't assume that there will only be different 3 rows in the return...

    SELECT Col1,Col2,Col3,MAX(Col4) AS Col4
    FROM yourtable
    GROUP BY Col1, Col2, Col3
    ORDER...
  • RE: Help me with this t-sql

    For the data presented, this'll do it... and it doesn't assume that there will only be different 3 rows in the return...

    SELECT Col1,Col2,Col3,MAX(Col4) AS Col4
    FROM yourtable
    GROUP BY Col1, Col2, Col3
    ORDER...
  • RE: speed up LEN(RTRIM(LTRIM(ERR))) > 0????

    Whether the column allows NULLs or not, the following will produce returns only if the column is NOT NULL and the column has something other than all blanks regardless of...

  • RE: BCP import using format file

    It seems like a pretty straight forward error message... your table won't allow nulls in the Status column but you're trying to add rows from data that contains no status. ...

  • RE: select record based on latest update date

    I understand the question but why must it be without a sub-query?  Seems like a very unnecessary limitation unless you're doing this in an early version of MySQL or something...

  • RE: Date Calculations

    Uhhg... I know you're right and it works great, but I just can't bring myself to do it  because way deep down inside, I know...

  • RE: getting started with BCP

    WOW!  Another myth destroyed.  I was always led to believe that BCP was always faster than BULK INSERT.  Phil's post

    prompted me to do some long overdue testing on that fact. ...

  • RE: sql date question

    Try this, Donald...

    select * from xyz where datefield >= DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)

                              AND  datefield <  DATEADD(dd,DATEDIFF(dd,0,GETDATE()),0)+1

    The DateAdd/DateDiff thing strips the time from the date without the expense of a character conversion and without...

  • RE: format numbers as strings with commas

    Finally... the voice of reason...

  • RE: limitation to UDF parameters (returns table)?

    If the UDF returns a scalar value instead of a table datatype, it would be like saying...

    SELECT * FROM ((1))

  • RE: How to remove multiple spaces in a varchar?

    Similar to what's already been suggested but accomplished in a single step...

    REPLACE(REPLACE(@WordList,'  ',' '),' ',',')

Viewing 15 posts - 58,306 through 58,320 (of 59,053 total)