MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Regarding multiple left outer joins

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
valeti_sashi
Beginner


Joined: 11 May 2005
Posts: 12
Topics: 7
Location: Chennai, India

PostPosted: Wed Nov 08, 2006 3:27 am    Post subject: Regarding multiple left outer joins Reply with quote

Hi,

i am converting Sybase queries to DB2 quries. i have problem in converting a query which involves mutiple left outer joinms:
Code:

select
        ac.acct_id,
        ac.n_pbt_cnty,
        ac.c_pbt_st,
        ac.i_pbt_crt_num,
        ac.i_pbt_crt_dkt,
        ac.i_pbt_crt_pg,
        ac.n_pbt_ac_chgd,
        ac.c_pbt_ac_stat,
        ac.c_crt_type,
        ac.c_crt_dept,
        ac.c_crt_dvsn,
        ac.d_pbt_birth,
        ac.t_pbt_rsn,
        an.c_pbt_acntg_num,
        an.d_pbt_ac_rpt_beg,
        an.d_pbt_ac_rpt_end,
        po.instr_id,
        '0',
        po.a_pbt_mv_end_chgd,
        '0',
--sort seq below
        '2',
        '0',
        0,
        0,
        ' ',
        ' ',
        ' ',
        '0',
        '0',
--excpt fields below
        ' ',
        se.i_inv_sup_catg_chg
from
        pbt_ac          ac,
        pbt_acntg       an,
        pbt_pos         po,
        pbt_sec         se
where (ac.acct_id = @cst_acct_id)               and
      (an.acct_id = ac.acct_id)                 and
      (an.i_pbt_acntg = @cst_i_pbt_acntg)       and
      (po.i_pbt_acntg = an.i_pbt_acntg)         and
--outer join
 [b]     (ac.acct_id       *= se.acct_id)          and
      (po.instr_id      *= se.instr_id)         and[/b]
     (se.i_inv_sup_catg_chg = '15')            and
      (se.c_pbt_sec_stat != 'DEL' )             and
      (po.c_pbt_pos_stat != 'DEL' )

In Sybase "*=" means left outer join. the two lines in bold are the joins in this query.

Can any one tell the DB2 conversion of this these two joins.

Please let me know of any question.
thanks in advance.
_________________
Regards,
Sashidhar
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group