0

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

6
  • Can you show what the datatypes of the columns are in the table? Commented Jul 22, 2014 at 20:22
  • The SiteIDNumber is INT (signed 32 bit) and SequenceNumber is BIGINT (signed 64 bit) Commented Jul 22, 2014 at 20:23
  • I'm not sure why but it seems that DataTypes are not recognised correctly. What happens if you change the query to include a explicit cast to INT or BIGINT? Commented Jul 22, 2014 at 20:27
  • Changing the SSIS variables to 32bit makes it work. Changing the query to include an explicit cast to bigint has no effect. Commented Jul 22, 2014 at 20:29
  • 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. Commented Jul 22, 2014 at 20:33

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.