outer join in oraoci9 stage

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
sdfasih
Participant
Posts: 39
Joined: Wed May 24, 2006 7:22 pm

outer join in oraoci9 stage

Post by sdfasih »

Hi,
I would like to know how to configure oraoci9 stage in server 7.5 for a outer join between two tables.
Table A
---------
last name
first name
ssn

Table B
----------
ssn
suffix
middle initial

I would like to join on ssn.
Thanx in advance.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You dont need to configure anything. Just deal with the sql.
  • -Load the meta data of both the tables
    -In the derivations, prefix it with the table alias name that you are going to use. Say A for Table A and B for Table B
    -When you go to sql tab, the generated sql will show

    Code: Select all

    select A.last_name, A.first_name, A.ssn, B.suffix, B.middile_initial from Table_A A
    
    -In the others section you will put

    Code: Select all

    left outer join Table_B B ON
    A.ssn = B.ssn
    
Thats about it. Similarly you can do a different joins.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Re: outer join in oraoci9 stage

Post by narasimha »

sdfasih wrote:Hi,
I would like to know how to configure oraoci9 stage in server 7.5 for a outer join between two tables.
Table A
---------
last name
first name
ssn

Table B
----------
ssn
suffix
middle initial

I would like to join on ssn.
Thanx in advance.
You dont need to configure anything in the OCI stage to do an outer join.
All you need to write a query to do it.
check this linkto know about the various joins in Oracle.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can also use the SQL Builder or Fully Generated option in the OCI stage. If outer joins are mysterious to you, it will walk you through the process.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply