• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

putting descriptions between different SELECTS in a Stored Proc

for simplicity sake, let's say there are 5 different SELECTS in a stored proc.. all the job for the stored proc is to return the 5 result sets to the user.

is there a way to put a description of the result set before each one is displayed?

0
25112
Asked:
25112
3 Solutions
 
oleggoldCommented:
You can use comment
0
 
25112Author Commented:
i mean the output that the user will be seeing on the resultset.. ( are you saying comment inside your code)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
25112Author Commented:
in my case, there will be lot more columns.. in this example, it worked good as there was only one column to output.. i want to give a title for each result set.
0
 
Anthony PerkinsCommented:
I have no idea why you would want to do this, but if you insist you coud do something like this:

SELECT 'Description for query1'
SELECT query1 ...

SELECT 'Description for query2'
SELECT query2 ...

SELECT 'Description for query3'
SELECT query3 ...

SELECT 'Description for query4'
SELECT query4 ...

SELECT 'Description for query5'
SELECT query5 ...

0
 
vastoCommented:
Add a column Description to each recordset
SELECT 'Your description here' as Description , column1, ...columnN FROM ....

0
 
25112Author Commented:
it is a requirement given.. your ideas will fit the bill.

thanks much.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now