Parameter within Parameter Value

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
cuckoo
Participant
Posts: 26
Joined: Mon Mar 22, 2010 4:03 am
Location: bangalore

Parameter within Parameter Value

Post by cuckoo »

Hi,

I have a parameter set P_Table which has a parameter called p_query.
The value of p_query is set to

SELECT A.*
FROM
#$evODS_OvrDB#.#$evODS_OvrSch#.xyz AS CTRL,
abc A
where A.header_id=ctrl.header_id

Please note that #$evODS_OvrDB# , #$evODS_OvrSch# are two user defined project level params.

In the actual parallel job, within the ODBC connector, I am setting SQL_STATEMENT to P_Table.p_query . This is not working though. Its not substituting the parameter values for the user defined parameters.
If i substitute the values then it works.

Does parameter within parameter not work?
Is there any other alternative i can use instead?
Please suggest.


Thanks in advance


:)
thank you
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

No. Highly doubt that
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Parameter within Parameter Value

Post by chulett »

cuckoo wrote:Does parameter within parameter not work?
Correct - it does not work.

You would need to build the parameter string with the values substituted before passing it as a parameter. That or just pass the parameters as parameters and bind them into existing SQL. Does the source SQL really need to be 'dynamic'?
-craig

"You can never have too many knives" -- Logan Nine Fingers
cuckoo
Participant
Posts: 26
Joined: Mon Mar 22, 2010 4:03 am
Location: bangalore

Post by cuckoo »

Thank you craig ! I used Ereplace to convert ,the Dynamic SQL. It works now!
Big thank you :D
thank you
Post Reply