LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2011, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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

Hi,

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 following code.

proc sql; 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);

quit;

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.

Thanks.

Eduardo


Back to: Top of message | Previous page | Main SAS-L page