Can somebody help me converting this joins in to my sql..
SELECT DISTINCT
b.gl_acct_type + '0',
b.gl_id,
b.fd_id,
b.gl_sub,
b.gl_tran,
b.gl_entry_type,
IsNull(b1.gl_amount,0),
IsNull(b2.gl_amount,0),
IsNull(b3.gl_amount,0),
IsNull(b4.gl_amount,0),
IsNull(b1.gl_debit,0),
IsNull(b2.gl_debit,0),
IsNull(b3.gl_debit,0),
IsNull(b4.gl_debit,0),
IsNull(b1.gl_credit,0),
IsNull(b2.gl_credit,0),
isNull(b3.gl_credit,0),
IsNull(b4.gl_credit,0),
b.detail_yn
FROM
zz_cfs_bal_1 b,
zz_cfs_bal_2 b1,
zz_cfs_bal_2 b2,
zz_cfs_bal_2 b3,
zz_cfs_bal_2 b4
WHERE
b.gl_acct_type IN ('1', '2', '3') AND
b.gl_id *= b1.gl_id AND
b.fd_id *= b1.fd_id AND
b.gl_entry_type *= b1.gl_entry_type AND
b1.line_type=1 AND
b.gl_sub *= b1.gl_sub AND
b.gl_id *= b2.gl_id AND
b.fd_id *= b2.fd_id AND
b.gl_entry_type *= b2.gl_entry_type AND
b2.line_type=2 AND
b.gl_sub *= b2.gl_sub AND
b.gl_id *= b3.gl_id AND
b.fd_id *= b3.fd_id AND
b.gl_entry_type *= b3.gl_entry_type AND
b3.line_type=3 AND
b.gl_sub *= b3.gl_sub AND
b.gl_id *= b4.gl_id AND
b.fd_id *= b4.fd_id AND
b.gl_entry_type *= b4.gl_entry_type AND
b4.line_type=4 AND
b.gl_sub *= b4.gl_sub
Thanks in advance
Here you go, this should get rid of the old ansii style joins.