July 21, 2014 at 9:42 am
Hi
I have a query with the fields: unitname, pointname, point description
as:
worthington,anderton,comms status
smithfield,waverley, boot status
islignton, shenfield, exit status
Select unitname, pointname, pointdescription
from production
I would like to a SSIS package so what when the package is run for each change in name of unitname, the details are exported to an excel file.
e.g.
first file would be named worthington.xls second named smithfield.xls
July 21, 2014 at 9:56 am
Here's one approach:
(1) SELECT DISTINCT unitname FROM production
(2) Loop through that result set something like this:
SELECT pointname, pointdescription
FROM production
WHERE unitname = ?
(3) Export the result of (2) to an Excel workbook called ?.xls
John
July 21, 2014 at 10:15 am
you can go with Foreach Loop container to pick each diffrent set and write to an excel file.
July 21, 2014 at 3:53 pm
Thanks Guys. Can anyone point me to any specific examples. Much appreciated.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply