Metaphor
Metaphor

Reputation: 6395

ForEach ADO loop variable mapping

Running into a problem on a ForEach over a full result set from a query on an OLE DB connection. The parameter numbers in the execution results seem to be all screwed up. I would appreciate some more eyes on this as I am not seeing the problem.

Here is the query on the result of which I'm iterating:

enter image description here

enter image description here

Variable mapping in the ForEach Loop:

enter image description here

The variables:

enter image description here

This is what I get:

enter image description here

Upvotes: 0

Views: 1556

Answers (2)

tablaplanet
tablaplanet

Reputation: 1

Use "select convert(varchar(20), BIGINTVARIABLE) from SOURCETABALE" instead of normal select. This will allow a workaround for the ForEach loop to work with the BIGINT variable.

Upvotes: 0

TMNT2014
TMNT2014

Reputation: 2130

Apparently there are some issues with conversion between BigInt and Int64 in past releases of SSIS not sure if they were fixed in the 2012 version. I think your best bet would be to store the bigInt as string.

Upvotes: 4

Related Questions