Forum Replies Created

Viewing 15 posts - 1,171 through 1,185 (of 4,080 total)

  • RE: Combinations of rows

    Recipe number 7 looks a lot like recipe #1 to me... This problem seems oddly familiar though.

    __________________________________________________

    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: distinct/grouping problem

    You didn't mention how big your table was (number of rows.)

    To see some performance comparisons of different techniques dealing with a similar problem.

    http://www.sqlservercentral.com/articles/T-SQL/69481/

    __________________________________________________

    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: Conditional Counting

    You CAN use a CASE statement in a COUNT... --Jeff Moden

    It's just a personal preference. I just feel happier summing ones and zeroes, than...

    __________________________________________________

    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: Conditional Counting

    One approach is to use SUM(CASE...) in place of COUNT().

    The trick is to make the test for an earlier Trans_Type = 1 quick. Depending on 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: how to query a table via its id

    Forget the object_ID. You need to know the object name for a table_source in the SELECT ... FROM.

    I can think of two approaches...

    __________________________________________________

    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: Are the posted questions getting worse?

    Brandie: Congratulations for the story AND congratulations for getting to do work that you love.

    __________________________________________________

    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 NTILE OVER (PARTITION BY .. running total..) possible?

    I don't believe this should be done with set-based coding. You are essentially slicing up an ordered set of row into 3k chunks ( or "tiles" as...

    __________________________________________________

    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: Are the posted questions getting worse?

    SQLRNNR (4/28/2011)


    Stefan Krzywicki (4/28/2011)


    The Dixie Flatline (4/28/2011)


    SQLRNNR (4/28/2011)


    Ah suds, I better timewarp to get that new update so I can come back to the present, upgrade my timewarp and then...

    __________________________________________________

    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: Are the posted questions getting worse?

    SQLRNNR (4/28/2011)


    Ah suds, I better timewarp to get that new update so I can come back to the present, upgrade my timewarp and then run the new version with 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: Are the posted questions getting worse?

    Jason, it's easy.

    Use DBCC TimeWarp's

    New parameters.

    __________________________________________________

    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: Are the posted questions getting worse?

    Haiku

    Listen... can you tell?

    Someone is using cursors.

    Hear the pork chops fly!

    __________________________________________________

    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: Persisted computed columns VS index over computed column

    I think that was the point behind his question, Stefan. Why would he ever need to make a computed column persisted?

    __________________________________________________

    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: Persisted computed columns VS index over computed column

    In this as in all things, it depends.

    You are correct. If your query is using a covering index then the data isn't coming from the clustered index....

    __________________________________________________

    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: RunningTotal on my TSQL don´t return values

    Did you deliberately comment out @RunningTotal in your FETCH...INTO?

    FETCH NEXT FROM RunningTotalCursor

    INTO @conta,@docnome, @u_subconta, @data, @mlstamp,@dinome, @adoc, @dilno, @edeb, @ecre, @NomeCli--, @RunningTotal

    __________________________________________________

    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: Function inside a Stored Procedure

    There is nothing wrong with using a function in a stored proc nowadays. However, there have always been issues with substituting subqueries with scalar functions that included...

    __________________________________________________

    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 - 1,171 through 1,185 (of 4,080 total)