Date: Thu, 10 Mar 2011 15:10:01 -0500
Reply-To: Eduardo Galvan <egalvan@ISR.UMICH.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Eduardo Galvan <egalvan@ISR.UMICH.EDU>
Subject: Proc Sql Update with 2 Tables
I am trying to update a variable (mq511m4) in one table (H10q_r2) with the
values of a variable(mx055) in another table (Grids_new02142) using the
update work.H10q_r2 q
set mq511m4 = (select g.mx055 from work.Grids_new02142 g
where g.sampid = q.sampid and g.mx054 = q.mq511m4)
where sampid in (select sampid from work.Grids_new02142);
Unfortunately, after the processing is finished the variable I am trying
to update contains only blank data.
Any suggestions on how to fix the code would be appreciated.