Forum Replies Created

Viewing 15 posts - 196 through 210 (of 4,080 total)

  • RE: Convert Columns to Rows

    So, does anyone want to run a test where all 50 states are accounted for?

    I agree that this has been one of those forums that has been thought-provoking in terms...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Quert Required

    And please don't post in multiple forums. And most especially don't post in forums of a higher level than your production level....

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Split a string on Commas - except when it has a numeric character immediately on either side of it

    Some questions, since you submitted no sample data.

    The problem involves two or more numbers being strung together like this:

    23,346

    246,802

    7,890,123

    23,346,246,802,7,890,123

    Questions:

    First, does this varchar column contain ONLY numbers?

    Second,...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Split a string on Commas - except when it has a numeric character immediately on either side of it

    You might also look at the pattern-based splitter function found HERE[/url].

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Convert Columns to Rows

    Because it scans the input data start to finish three times. Once for each total.

    The more states you add, the more table scans it is going to...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Is Division by Zero NULL?

    Yeah? Well how would *you* feel if Hitler said that about *you* ?!? :crazy:

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Convert Columns to Rows

    You can't pivot it back unless you preserve the original ID. See below.

    CREATE TABLE #UnPivotExample(code varchar(2), [value] int, id int)

    INSERT INTO #UnPivotExample (code,value,id)

    SELECT code,value,id

    FROM

    (SELECT ID, [AZ], [NY],...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Convert Columns to Rows

    Is it just me, or is the syntax for PIVOT/UNPIVOT *much* harder to follow than cross-tab or APPLY VALUES ?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Quert Required

    I say CTE... you say DT... let's call the whole thing off!

    I should change my example to use nested CASE statements and argue that it avoids blocking.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Quert Required

    Great minds?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Quert Required

    Here you go. Cross applying the values clause gives you both the difference (df) and final mark (fm) for each combination on a separate row. The...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Is Division by Zero NULL?

    (ever get involved with the highlander series of movies?)

    Not after the first one, but I am a big fan of Lazarus Long.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: format query result

    It's the STUFF that dreams are made of... 😛

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: rotation by percentage rather than equal rotation of ISCI values

    +1

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: delete millions of rows

    Jeff, I've got someone trying to get that information now. But by my calculations, it's doing 444 rows per second. That seems slow.

    Curiously, the execution plan...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 196 through 210 (of 4,080 total)