August 4, 2008 at 6:42 pm
Hello Experts,
Any help would be much appreciated.
i want to export data from dbo table to flat file including a footer with rowcount.
thanks in advance.
August 4, 2008 at 6:47 pm
Is this something you want to schedule or is it a 1-time thing? IF 1 time you can do it in SSMS by sending the results to a file.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 4, 2008 at 6:53 pm
Hi Jack,
I want this to schedule as a Job.
I have a requirement to send daily a flat file with update records on table.
Need to create a flat file (destination) with data and as well a rowcount at the bottom (can say footer kinda). ex : rows(10)
I hope you understood my problem.
thanks.
Nav
August 4, 2008 at 7:33 pm
Yes, I understood what you needed except for the schedule part. I'm not sure how you would do this in SSIS. You could do an execute SQL Task with 2 resultsets, the first being your query and the second being Select @@RowCount as rows.
Then you can do a For Each Loop over the first result set that writes to a file and then append the second resultset to the file after the For Each Loop.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 4, 2008 at 11:56 pm
Hi Jack,
I found the way to do.
first writing all the data to flat file. same time getting the rowcount to a variable which have package scope.
And with the script component created a row and appended to the same data file.
thanks
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply