Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

output file and row count

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a stored proc that returns grouped result sets. The output is a file. In the header, I want to put a total 'group' count. I can get the count by doing a simple count(*) of the temp table after it is grouped. But how do I output this single value in my final select?
 
I will insert a row in the table with the count. I will create a numbered column with the first row = 1. Then I will order by the numbered column which will place the count value at the head of the file.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top