Dynamic where clause from another table

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
sgharrison
Participant
Posts: 1
Joined: Mon Apr 18, 2005 11:22 pm

Dynamic where clause from another table

Post by sgharrison »

Does anyone know if its possible to take a complete where clause stored in a varchar field on one table and then apply it to a source table as its where clause ?

We wish to store the where clause elsewhere so users can dynamically extract specific data from a table to a sequential file.

Thanks
Scott.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't know if you can do this in Sybase.

In DataStage you will need to select the contents of the VarChar column, load this into a job parameter, and use a reference to that parameter in the WHERE clause in a controlled job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

In Sybase, you may need tsql to perform this action. As Ray suggested, you will be better-off doing it in DataStage by including the 'where' clause as a parameter and include it in your source sql selection.
Post Reply