Journal Bill Dog's Journal: would've never guessed that 2
Ran into something today. Found the answer:
4. INSERT queries that use SELECT with ORDER BY to populate rows guarantees how identity values are computed but not the order in which the rows are inserted
Mentally masticate on that one for a minute. You carefully craft an ordered query for output to a web page view. But you need to return other resultsets based on it, so you INSERT that SELECT into a table variable, use it to produce your other resultsets, and then finally SELECT from the table var as the last resultset to return.
But then you find your ordered query is ordered, just not your order! Would've never seen that even coming. So I slapped an IDENTITY column on the table var and sorted on it for the final resultset. Whatevs.
Scalability? (Score:2)
Re: Scalability? (Score:1)
+1 Insightful