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 !!
Join Tables
Moderators: chulett, rschirm, roy
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 :wink:](./images/smilies/icon_wink.gif)
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.
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 :wink:](./images/smilies/icon_wink.gif)
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
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Craig's pretty much got it.
In the ODBC stage's Output link:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.