Print vs Select - security through obscurity ?
Now here's an interesting snippet which I'm sure will provoke a few " ... and you didn't know that! " comments.
I wanted to take the output from a stored procedure into a table using the insert into mytable exec proc; command but despite my best efforts this just wasn't happening.
After a little investigation I discovered that the output from the procedure was being generated using the print command.
My investigations showed that you cannot put the output into a table when it is generated with the print command.
All I had to do was change the print to a select and everything worked as expected.