cznex

01-17-2007, 08:39 PM

Hi guys

I need code in joining tables, here is the conditions I need to check

(If S.prod _id !=1

If S.prod_nm=x then join x1 where S.prod_id = x1.prod_id and S.dt= x1.dt)

And

(if s.prod_nm=y then join x2where S.prod_id=x2.prod_id and s.dt=x2.dt)

S= source data

X1 = db1.tb1

X2 = db2.tb2

And the result I get I need to insert into Z field in the temp table

Thanks guys in advance

I need code in joining tables, here is the conditions I need to check

(If S.prod _id !=1

If S.prod_nm=x then join x1 where S.prod_id = x1.prod_id and S.dt= x1.dt)

And

(if s.prod_nm=y then join x2where S.prod_id=x2.prod_id and s.dt=x2.dt)

S= source data

X1 = db1.tb1

X2 = db2.tb2

And the result I get I need to insert into Z field in the temp table

Thanks guys in advance