Forum Replies Created

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

  • 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,'  ',' '),' ',',')

  • RE: Date Calculations

    Yes, it is wrong... it does not account for Leap Years.

    The following shows an age of 55 when the real age is 2 WEEKS less than what is shown...

    Declare

       ...

  • RE: how to exclude null/blank/emply columns from the result set?

    quote I still don't understand what test the clause -- substring(ResourceEnterpriseRMV21ID,1,1) > 0 -- is really doing??????

    If...

  • RE: String Parsing UDF

    Thanks Ryan... Yep... I should'a said "too"

  • RE: String Parsing UDF

    Very interesting problem... thought I'd try the "exercise" a wee bit differently...

    This one uses a "Tally" table... If you don't already have one, this is one way to make one...

  • RE: bcp question - Column Names?

    Jeff,

    If you are talking about importing with BCP, you can tell it to skip the first row by setting the first row (-F) parameter to 2.

    If you are talking about...

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