r_slot (4/10/2013)
Thanks a lot Steve: I understand you solution a little bit better than the others, but the subject stays difficult for me. When I look into the messages as a result of running your solution I see a perfect (dynamic) table. Is it possible to export that table to a webpage (eg Visual Web .aspx)? I want to show the results in a gridview, but the SQL-variable is of course no table with rows. In fact is your solution in the end a table and could be the final product of a stored procedure.The (silly) question I still have is: is the above mentioned possible or am I talking rubbish?
Any answers/reactions would be appreciated.
Above all: compliments for your solution - I gonna try to understand it.
Robert
To answer the question
Yes, it's possible to do it. Unfortunately, I don't know how to do it. A developer in a previous job used that in the web app, but I'm not sure how he did it.
If you find it easier to have a physical table, you can use SELECT...INTO to create a table.