Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Header and Footer

Author  Topic 

Lakiesha31
Starting Member

6 Posts

Posted - 2010-06-22 : 11:24:30
how would I input a header and footer into my sql script?


this is the sample I have

Trailer|(total # of records)|(total amount)|||||||||

how would I script this?

Thanks for your assistance

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2010-06-22 : 15:39:04
do you have any sample data?

how do you want your output to look like?
Go to Top of Page

Lakiesha31
Starting Member

6 Posts

Posted - 2010-06-24 : 17:58:48
quote:
Originally posted by slimt_slimt

do you have any sample data?

how do you want your output to look like?



Thanks for your assistance
Go to Top of Page

Lakiesha31
Starting Member

6 Posts

Posted - 2010-06-24 : 18:00:11
The results of the query is run to a text file output. so vertical and horizontal...my header vertical and the details of my text file is vertical....Overall it's a text file output.



quote:
Originally posted by Lakiesha31

how would I input a header and footer into my sql script?


this is the sample I have

Trailer|(total # of records)|(total amount)|||||||||

how would I script this?

Thanks for your assistance



Thanks for your assistance
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2010-06-25 : 14:58:28
If you want a text file output that has more than one layout (a header layout, a data layout, a footer layout) then to do it in SQL will require a rather hackish-looking (but workable) UNION query.

________________________________________________
If it is not practically useful, then it is practically useless.
________________________________________________
Go to Top of Page
   

- Advertisement -