dynamic sql in oci stage.

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kollurianu
Premium Member
Premium Member
Posts: 614
Joined: Fri Feb 06, 2004 3:59 pm

dynamic sql in oci stage.

Post by kollurianu »

Hi all ,

Is it possible in datastage to create a dynamic sql in oci stage .
Appreciate your inputs and help.

thanks to all
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Depends on your definition of 'dynamic'. What are you trying to accomplish?
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The closest you'll get to 'dynamic' (IMHO) is the Update Action of 'Load SQL from a file at run time'. Then the area where you would normally put your user-defined SQL holds the actual pathname of the file to load. Something to note, however, if you do that. While you can use job parameters for the filename itself, the actual SQL loaded from a file cannot contain any Job Parameters.

Your other option is to pass the SQL, or perhaps just a signficant portion of the WHERE clause, in as a Job Parameter and then bind that parameter into your generated SQL.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

An inferior solution (but possible) is use a user-defined SQL that calls a stored procedure, which in turn generates dynamic SQL in PL/SQL.
Ross Leishman
kollurianu
Premium Member
Premium Member
Posts: 614
Joined: Fri Feb 06, 2004 3:59 pm

Post by kollurianu »

Thank you all for your inputs.,
Post Reply