parameter to sql statement in OracleEnterprise 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
srinivas Guduru
Premium Member
Premium Member
Posts: 38
Joined: Sat Dec 29, 2007 9:58 am

parameter to sql statement in OracleEnterprise stage

Post by srinivas Guduru »

Hi

I am using Oracle Enterprisestage for Reading the data from a DB tables

In the SQL statement I am using 'LIKE' . I need to pass the parmeter value to LIKE in the sql select statement .

WHERE BA.col3 = SA.col3
AND MP.col2 LIKE 'SampleTable'

I want to parameterise the SampleTable value

Can you please provide the syntax for sql statement(LIKE 'SampleTable'
) and if any special syntax is there at under Prameters Tab please provide me this also

Thanks
Srini
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have you not used job parameters yet? They are typically enclosed in hash / pound signs when referenced, so:

WHERE BA.col3 = SA.col3
AND MP.col2 LIKE '#SampleTable#'

Where "SampleTable" is the name of your parameter. That's the basics, let's start there and see if it helps.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

probably, it should be like,

LIKE '%#SampleTable#%'

depends on your requirements it may vary
pandeeswaran
Post Reply