I am using the Attunity Oracle connector in SSIS to connect to a remote Oracle Server.
In my SSIS package, I need to connect to an Oracle database to fetch the data based on datetime parameters.
I followed the suggestions here to write a SELECT
query with a parameter:
- Created a package variable
- Set the variable to evaluate as expression true
- Put the query in expression along with parameter as a different package variable
- Set the expression for
[Oracle Source].[SqlCommand]
at Data Flow to package variable (containing the query as expression)
I am good up to here, but if you are setting an expression for [Oracle Source].[SqlCommand]
at the Data Flow, then what Query do I set in the "Oracle Source" inside the Data Flow task? How do I get the output columns and perform transformations?
I am not able to execute the package until I set a valid Oracle data source.
Every recommendation says to set the [Oracle Source].[SqlCommand]
property at the Data Flow, but nobody mentions how to configure the Oracle source.
Am I missing something here?
Update (2014/02/18) -
Based on comments by @billinkc, I created the data source with non-parameter query and added the expression at the data flow. When I execute the package, the query inside the data source changed to whatever is there in my package variable expression but it throws an error:
OCI error encountered. ORA-00936: missing expression
Here is my WHERE
clause of the query, with the variable timestamp -
Where SL.RECEIVED_DATE = TO_DATE( @[User::Last_Run_Timestamp] , 'dd/mon/yyyy HH24:MI:SS')