parameter to a view

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

parameter to a view

Post by vsi »

is it possible to pass a parameter to a VIEW(s) when connecting using DataStage.

Can you show the SQL query difference of this for a table and a view? or is there no difference how the query is made?
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

What do you mean by passing param to view?

When you use a param in the query which is accessing view, the param value gets replaced when the SQL is prepared and executed.
E.g. if you have view EmpDet on Employee table and you use select query on the view with a parameter in the query, DS will prepare it by substituting the param value. DS does not know if it is a view or a table. It just prepared the query to database and database then does the work substituting view def in the query and executing it.
Regards,
S. Kirtikumar.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

View doesnt make any differenct with table with respect to Datastage. Query were made similar to table. If you were refering to creation of the Table or view, you dont have any direct option to create a view but using user defined query, you can. And passing the parameter as well.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
vsi
Premium Member
Premium Member
Posts: 507
Joined: Wed Mar 15, 2006 1:44 pm

Post by vsi »

Thanks a lot
Post Reply