May 14, 2013 at 7:50 am
Currently I have an SSIS Package Truncates a Holding Table. Loads all of the records from an AS400 Table using an OLE DB Source & Destination.
Then it performs a performs and loads it into a Staging Table.
What I believe that I need to do is add an Execute SQL Task that gets that max DateWritten (AS400) format which has an output parameter and store it in a variable.
Then I need to Execute a Select against the AS400 Table and pass the variable DateWritten to the Where Clause.
I know I can't do this with an OLE DB Source Task but can I do it with the OLE DB Command?
If so does anyone know of any articles on how to accomplish this?
I seem to recall doing this in DTS many years ago.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
May 14, 2013 at 8:00 am
I found an article and it is basically the same way I did it in DTS although I'm not using a Stored Procedure in this case.
What task should I use to query the AS400 to get the MAX DateWritten?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
May 14, 2013 at 9:39 am
I got to the OLE DB Source and got an error on the paramater mapping.
[stg_Rec_Act [1]] Error: The SQL command requires a parameter named ""00001"", which is not found in the parameter mapping.
On the mapping I have Parameter0.
Any ideas what I did wrong?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply