• paul.knibbs (8/11/2014)


    Jeff Moden (8/9/2014)

    With the understanding you have of that counting problem and the additional understanding that I don't ask "trick" questions or questions based on trivia, explain or even speculate on what this method could be used for.

    I would imagine that you're doing this to populate a tally table--I know those are a thing that can be used to make various T-SQL tasks easier and faster, although I can't actually think of an example of using one off the top of my head.

    Give me totals for each day, include the days where there were no rows at all.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass