October 13, 2010 at 7:09 am
Hello.
Before I give myself some sort of stress related heart attack.
Would anyone know how to complete the seemingly simply task of setting the result set of one data flow task (the result will be either a 0 or 1) and assigning that value to a variable.
I've created the variable ok.
The result set comes from an XML file with multiple elements. The flag (0 or 1) is the result from one of those elements, so I also need to know how to get the result set to be just that flag.
If anyone could help I would really really appreciate it.
October 13, 2010 at 7:46 am
I assume that either the source or destination of your data flow is a SQL Server table? If it is, then you can create an Execute SQL task to get the information from the table into the variable.
John
October 13, 2010 at 8:15 am
Hi John,
Many thanks for the response.
So far (i'm fairly new to SSIS) I have three sequence containers, 1 parent and 2 children. The parent container has a data flow item which reads from an XML file.
The parent sequence container is linked to the 2 children containers with an expression which basically sales @Flag == 0 or @Flag == 1. In theory then each of the children containers should then write to a separate SQLServer2008 table depending on the flag.
The problem i'm having is setting the @Flag variable with the flag result from the XML file....also the XML file has multiple other elements so i'm unsure sure how to basically achieve
SET @Flag = flag -- when flag is the output from the XML.
Do you think this can be done by linking an execute SQL task to run after the get XML data task from the parent sequence container.
Many thanks
Chris
October 13, 2010 at 8:18 am
Chris
Yes, that's how I'd do it.
John
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply