Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

help needed for each loop

$
0
0

I have two tables, one a master and a second a child.

They are linked by a uniqueidentifier. field name LedgerKey

I am using an executeSQL task to select all the unidentifiers from the master table into a variable object called Transets

The foreach loop I have set the Enumerator as FOREACH FROM Variable Enumerator and the variable TRANSET

The variable mapping is set to user::Ledgerkey Index 0  the variable is set as an object.

Inside the foereach loop I have an execute SQL Task that

INSERT INTO Client_Arc.dbo.Transaction SELECT * FROM MT1.dbo.Transaction WHERE LedgerKey =  cAST(@LedgerKey as uniqueidentifier)

Under TSQL this query works but in SSIS it fails

[Execute SQL Task] Error: Executing the query "INSERT INTO Client_Arc.dbo.Transaction SELE..." failed with the following error: "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

any clues ?


Dont ask me .. i dont know


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>