A quick one today...I have been meaning to post this for a couple days but keep getting distracted.
Do you know how to turn a simple query statement into a lean mean looping machine without while loops or cursors? Okay, so maybe I've had too much coffee for one evening but I find this handy. :)
Here's the simple syntax:
SELECT 'Woo hoo' AS myBrilliantOutput;
GO 5
This will give you 5 result sets in Management Studio. Under the covers SQL Server is handling this as 5 separate requests. It's not functionality that you're going to write into your application but for some quick and dirty load testing it can be super useful. I also use this to insert sample data into a table for index testing.
So there's a couple good options available through pretty simple syntax. If you use this for something other than the items listed drop a geek a line. I'm always interested in seeing how other people do things.
98c75357-26bc-4bb8-b60e-281e51406bf6|0|.0