Forum Replies Created

Viewing 15 posts - 6,316 through 6,330 (of 7,636 total)

  • RE: Split data

    I don't see any data type definitions. Should we just assume that all columns are varchars?

  • RE: By the time you could afford it you didn't need it.

    "It's not getting what you want, .. it's wanting what you've got."

  • RE: detect "no record"

    Like this:

    DECLARE @PMH as varchar(500)

    SELECT @PMH=''

    SELECT @PMH=p.TextBody

    FROM dbo.PartyText p

    WHERE p.DataPointID=186

    And p.PartyID=19396

    print @PMH

  • RE: Validate Date

    Jeff Moden (7/11/2008)


    rbarryyoung (7/11/2008)


    this was never possible with the old syntax

    That's not true...

    Hey, I just realized... This is the post that you broke 10,000 on! :w00t:

    Woo, hooo! Makes...

  • RE: Validate Date

    How's that?

  • RE: coalesce negative values

    The canonical way to do this is to OR the values to gether and then test the Negative bit (or just test the final result for negative). Unfortunately, there...

  • RE: CPU 100% Lots of Loks. tempdb.dbo.#TMP_CLIENTS_PROCESSING

    What are you hoping to get from us?

  • RE: Cannot delete table

    Wierd.

    Try to rename it?

  • RE: coalesce negative values

    GSquared (7/11/2008)


    The NullIf thing will only work if the value is -1 (or am I missing something). I'm assuming the possibility exists for any valid negative integer.

    Oops, you are...

  • RE: Validate Date

    Peso (7/11/2008)


    Beware of rounding!

    If you run the suggested code PM, you will not get today's beginning.

    Declare @Today smalldatetime

    -- beginning of today:

    Select @Today = Cast(Cast(getdate() as int) as smalldatetime)...

  • RE: How to select Top row and update it in another table??

    You need to use TOP with an ORDER BY clause to give it what BOL calls "a meaningful chronology":

    update TOP (1) s

    set [past effective date 1] = s.effective_date

    ...

  • RE: coalesce negative values

    I think that this works too:

    Select Count(NullIf(values,-1))-Count(values) From table

    Probably not any faster than Gus's, but I guess it'll help those out aching fingers 🙂

    Of course, now that I look at...

  • RE: Analytical Interview Questions

    Loner (7/11/2008)


    There are two rooms separating by a wall, one room has three lamps, the one one has three switches, can you tell how to find out which switch is...

  • RE: Validate Date

    I agree with Lynn.

    Using commas is the older, "SQL-89" syntax and it is deprecated now.

    Using "JOIN" is the newer "SQL-92" syntax and it IMHO much preferred because:

    1) It is...

  • RE: Get rid of cursors

    I think that you might have the wrong idea, Mike. Like Lynn, I started to look at this a couple of days ago, but after an hour or so...

Viewing 15 posts - 6,316 through 6,330 (of 7,636 total)