Regarding Parameters

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
veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Regarding Parameters

Post by veera24 »

hi all,
Am having Database as a source. I got to parameterize the TABLE NAME in that DB. After importing the required table(in both table name field and as well as the meta data of the table in the column tab) and i gave Generated SQL query. I've parameterized the table name and it got reflected only in the last of Query.I mean there was a reflection in the FROM clause only and not in the SELECT clause. But i wan it to get reflect on both SELECT and FROM clause.
your time will be highly appreciated.

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

Post by ray.wurlod »

For one table, or even if there is more than one table but the table names are unambiguous, you don't need to quality the column name with a table name. On the Columns tab simply clear the Derivation fields.

If you do need qualified table names, to use the job parameter reference as the column name simply include that in the Column Derivation field, for example #CustTable#.CUST_ID
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
veera24
Premium Member
Premium Member
Posts: 150
Joined: Thu Feb 07, 2008 9:37 pm
Location: NewYork

Post by veera24 »

ray.wurlod wrote:For one table, or even if there is more than one table but the table names are unambiguous, you don't need to quality the column name with a table name. On the Columns tab simply clear the Derivation ...
Consider if A is my source DB and i've parameterized that as #DB# then the #DB# shud be reflected in the SELECT clause right?If that will not be the case then it will ask for aliases..cos i've encountered the same problem as aforementioned.I get the error stating that it reuiqres aliase name in SELECT clause.

Thnx.....
veera..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Depends. With a single table, no. With multiple tables where the column names are unique, no.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Derivation field (or if blank, the Name field) on the Columns grid becomes the SELECT clause.

The Table Name field becomes the FROM clause.

There is no intermixing. If you need qualified column names in the SELECT clause, you must specify those in the Derivation field.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Premium membership costs less than 30c per day and will allow you, among other things, to view the entirety of the five premium posters' contributions. All revenue from premium memberships is devoted to defraying hosting and bandwidth costs incurred by DSXchange so, by taking premium membership, you are not only receiving the benefits but also helping to keep DSXchange alive.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply