Hi All,
How can we pass parameters to user defined sql in ODBC stage?
-Nripendra
How to pass Parameters to user defined sql queries
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 196
- Joined: Tue Nov 23, 2004 11:50 pm
- Location: Sydney (Australia)
-
- Premium Member
- Posts: 196
- Joined: Tue Nov 23, 2004 11:50 pm
- Location: Sydney (Australia)
I want to use DECODE function
Hi All,
i want to use DECODE function in my user query but this function is not taking parameter's corresponding value. So should i use procedures?
-Nripendra Chand
i want to use DECODE function in my user query but this function is not taking parameter's corresponding value. So should i use procedures?
-Nripendra Chand
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
You can use a job parameter within a SQL stage by adding the parameter name surrounded by # symbols directly into user-defined SQL or condition fields.
Why do a DECODE in the database stage when you can do it in DataStage? DECODE is specific to Oracle so I assume you are trying to run it against an Oracle database. You might have more luck using it in the Oracle OCI stage or the Dynamic RDBMS stage instead of the ODBC stage. Personally I don't like using transformation functions in the select list of a database stage as it is not visible to the data lineage reporting functions in DataStage and MetaStage. Better to bring the column through in its rawest form and transform it in DataStage.
Why do a DECODE in the database stage when you can do it in DataStage? DECODE is specific to Oracle so I assume you are trying to run it against an Oracle database. You might have more luck using it in the Oracle OCI stage or the Dynamic RDBMS stage instead of the ODBC stage. Personally I don't like using transformation functions in the select list of a database stage as it is not visible to the data lineage reporting functions in DataStage and MetaStage. Better to bring the column through in its rawest form and transform it in DataStage.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Charter Member
- Posts: 199
- Joined: Tue Jan 18, 2005 2:50 am
- Location: India
-
- Premium Member
- Posts: 196
- Joined: Tue Nov 23, 2004 11:50 pm
- Location: Sydney (Australia)