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
sureshchandra
Participant
Posts: 92 Joined: Mon May 07, 2007 4:26 am
Post
by sureshchandra » Wed Jul 18, 2007 10:23 pm
Hi,
I want to fetch records from a table 'A' based on a condition-
where A.field > B.field . B is another table.
What stage can be used to apply this filter.
Thanks in Advance
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Wed Jul 18, 2007 10:35 pm
If A and B are in the same schema, I would do it in the original SQL where you select your records. That would be the fastest, most efficient method.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Jul 18, 2007 11:40 pm
Wouldn't even have to be in the same schema, the same database would do. Heck, doesn't even need to be that.
-craig
"You can never have too many knives" -- Logan Nine Fingers
hamzaqk
Participant
Posts: 249 Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad
Post
by hamzaqk » Wed Jul 18, 2007 11:47 pm
use the odbc stage..
create a dummy seq file with a dummy column which reads data from a dummy file with any value just to create an input link to the odbc stage.
seq file ----> odbc
in the odbc stage , choose user defined sql and u r ready to rock and roll !
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Thu Jul 19, 2007 2:54 pm
Just add the appropriate WHERE clause to the link properties in your database stage - probably on a tab called Selection.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.