Hi all,
can we execute oracle queries through any Datastage function like how we execute unix commands.
As when i want the output of a single select query
'select * from tablename' i put this in a sqlfile in my unix directory and execite this file through the unix commands in the routine and assign to a variable in the datastage.
Can it be done in a simpler way?
Thanks
can we execute oracle queries through any Datastage function
Moderators: chulett, rschirm, roy
Hi Parvathi,
Why cant you use the OCI stage and output to a sequential stage for this. Which is for the same reason. If you the SQL that you use is not compatable in OCI stage, you can alternatively use Shell script directly to call the .sql through ExecuteCommand Activity or in any Before/After subroutine. But it doesnt make much difference from your previous approach.
Why cant you use the OCI stage and output to a sequential stage for this. Which is for the same reason. If you the SQL that you use is not compatable in OCI stage, you can alternatively use Shell script directly to call the .sql through ExecuteCommand Activity or in any Before/After subroutine. But it doesnt make much difference from your previous approach.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There is no single function out of the box. But it's certainly possible to write a generic "Run SQL" function using BCI functions; I wrote one aeons ago. But, because you are UNIX-based, and presumably using the Data Direct ODBC drivers shipped with DataStage, you will need a licensed ODBC driver to adopt this approach.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.