From: Paul Lambson on
I am trying to update a oracle table using an implied join. I have
been able to refer to work.b table easily in an update using sub-
query. When i try the join'ish statement i get an "unresolved
reference to table/correlation name b" error. Any insight?

Thanks,


Paul
**THIS CODE ERROS OUT**;
proc sql;
connect to odbc (dsn=PROT user=sap4live password=DB!4Pros);
UPDATE PROT.P4LIVE_BKGLEG a
SET REVENUEFLAG = 1
where
(ORGNWRD=b.ORGNWRD
and DSTNWRD=b.DSTNWRD
and FLTWRD=b.FLTWRD
and DPTDATE=b.DPTDATE)
;
quit;

**THIS CODE DOES FINE**;
proc sql;
connect to odbc (dsn=PROT user=sap4live password=DB!4Pros);
UPDATE PROT.P4LIVE_BKGLEG
SET REVENUEFLAG = 1
WHERE ORGNWRD in (Select ORGNWRD from b)
AND DSTNWRD in (Select DSTNWRD from b)
and FLTWRD in (Select FLTWRD from b)
and DPTDATE in (Select DPTDATE from b)
;
quit;
From: shiva on
Hi Paul,

Try this...Hope this helps...

PROC SQL;
UPDATE PROT.P4LIVE_BKGLEG a
SET REVENUEFLAG = 1
where catx( '|' , ORGNWRD, DSTNWRD, FLTWRD,DPTDATE) in
(select catx( '|' , ORGNWRD, DSTNWRD, FLTWRD,DPTDATE) from
b)
;
QUIT;

Thanks
shiva