valeti_sashi Beginner

Joined: 11 May 2005 Posts: 12 Topics: 7 Location: Chennai, India
|
Posted: Wed Nov 08, 2006 3:27 am Post subject: Regarding multiple left outer joins |
|
|
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 |
|