Does anyone know how to incorporate header and trailer info in the text output from a DTS task. The SQL I'm using in the task works well when outputting to a text file on the server. However, when trying to incorporate header and trailer info the process fails. I tried doing it using SQL but the DTS transformation process is looking for fields to transform when I'm trying to output a 3 line header and 2 line trailer with the output rows in between. Has anyone done this before? Your help would be greatly asppreciated.
Here is an example of the SQL that fails:
*** Trying to get header info here ***
*** Main SQL runs here ***
from tblA a JOIN tblB b ON b.someid = a.someid
JOIN tblC c ON c.someid = a.someid
where a.someval >= '2003'
*** Trying to get trailer info here ***
select count(id) FROM tblA