Join Tables

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
vskr72
Premium Member
Premium Member
Posts: 128
Joined: Wed Apr 28, 2004 9:36 pm

Join Tables

Post by vskr72 »

Hi,

I am trying to join two tables (inner join) from an SQL Server 2000 DB.
Are there any built in stages to perform this join.

Appreciate your feedback.

Thanks !!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Welcome.

The ODBC stage is your only choice, as far as I know. Search on that keyword in this forum for many examples of how to configure your connectivity if you need help with that.

Any of the passive plugin stages for database access should allow joins to be performed. You typically have a choice of 'Column Generated' where the stage builds the SQL based on your column metadata and the 'extra bits' you provide, or via Custom SQL. There is also something called 'Fully Generated SQL' but it seems to be only for people who aren't sure how to build a query and should be avoided at all costs. IMHO, of course. :wink:

If you have problems with the join for any reason, another option would be to have a View created that performs it for you and then use the view as the input to your job.
-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 »

Craig's pretty much got it.

In the ODBC stage's Output link:
  • use a comma-separated list of table names on the General tab
    load required column definitions on the Columns tab
    specify your join criteria on the Selection tab in the WHERE field (you don't need the word WHERE)
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