Greetings,
I have a SQL 2000 (I also have 2005) qry file that runs through several steps. The qry file initially creates a table with a key column and several empty columns and then runs through a series of inserts. At the very end I execute a qry that rolls it all up into the view I need.
I recently created a batch file that executes this qry file on the scheduler overnight and emails me the resulting CSV file.
Problem is when the CSV file is created/output all of the SQL feedback above the final qry script (which i am only interested in seeing in the CSV) appears.
For example...
(20918 rows affected)
(13090 rows affected)
(93732 rows affected)
(46879 rows affected)
(16905 rows affected)
FieldA FieldB FieldC FieldD FieldE FieldF
-- -- -- -- -- --
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
I can do some data scrubbing/manipulation to the CSV file to arrive at a cleaner format, but this may not be scalable as I might need to develop a process for each report I create. If I had to would be open to doing this, but I wanted to run this by you all to see if there is an efficent way to only export the result for the last qry in my sql file or if there is a process you have implemented to handle this type of thing.
I do not have SQL storage space as an option. The process creates temp tables on the fly, loads data to the temp tables, exports to the CSV, and leaves no foot print.
Sorry if I have confused.
Thanks for your time and help,
CGH
I have a SQL 2000 (I also have 2005) qry file that runs through several steps. The qry file initially creates a table with a key column and several empty columns and then runs through a series of inserts. At the very end I execute a qry that rolls it all up into the view I need.
I recently created a batch file that executes this qry file on the scheduler overnight and emails me the resulting CSV file.
Problem is when the CSV file is created/output all of the SQL feedback above the final qry script (which i am only interested in seeing in the CSV) appears.
For example...
(20918 rows affected)
(13090 rows affected)
(93732 rows affected)
(46879 rows affected)
(16905 rows affected)
FieldA FieldB FieldC FieldD FieldE FieldF
-- -- -- -- -- --
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx
I can do some data scrubbing/manipulation to the CSV file to arrive at a cleaner format, but this may not be scalable as I might need to develop a process for each report I create. If I had to would be open to doing this, but I wanted to run this by you all to see if there is an efficent way to only export the result for the last qry in my sql file or if there is a process you have implemented to handle this type of thing.
I do not have SQL storage space as an option. The process creates temp tables on the fly, loads data to the temp tables, exports to the CSV, and leaves no foot print.
Sorry if I have confused.
Thanks for your time and help,
CGH