SQL for Reference Inputs

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
Sunshine2323
Charter Member
Charter Member
Posts: 130
Joined: Mon Sep 06, 2004 3:05 am
Location: Dubai,UAE

SQL for Reference Inputs

Post by Sunshine2323 »

Hi,

In the ODBC stage if we select User Defined Query, we get two input boxes for the SQL Query tab
--SQL for Primary Inputs
--SQL for Reference Inputs


To test the two we made a simple job which looks up against the ODBC stage and wrote the Select SQL in the SQL for Reference Inputs and ran the job.
The job ran giving the desired output except that the View Databutton was not enabled.

Now we did the same this time writing the SQL in the SQL for Primary Inputs and got the same result as before except that the View Data button was enabled.

What is the significance of the SQL for Reference Inputs input box?
Is there any performance enhancement for the lookup if the SQL is written in the SQL for Reference Inputs input box?

Thank You,
Warm Regards,
Amruta Bandekar

<b>If A equals success, then the formula is: A = X + Y + Z, X is work. Y is play. Z is keep your mouth shut. </b>
--Albert Einstein
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Sunshine,

when you use this stage with a dotted-line as a reference input to a transform stage the "reference input" logic will be used - it has a SELECT whilst the main input quite often does not. The greying out of the view data button is a function of filling out the Primary input box.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Arnd really means that a reference link has a WHERE clause (to specify which row(s) to be looked up) whereas a stream link may not have a WHERE clause (of course, it may, but a reference link must have one).
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