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 (July 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 1 Jul 2008 09:27:19 -0400
Reply-To:   Jan Sunde <jan.sunde@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jan Sunde <jan.sunde@GMAIL.COM>
Subject:   Update info in data set based on other data set

Hi I have a problem as follows : I want to create a dataset C that copies all of data set A as well as adds an additional variable (varx) as 0/1 based on whether an observation id in dataset A occurs in dataset B (on the same date). I have tried a PROC SQL as follows but with no success:

proc sql ; create table c as select a.*, case when a.id=b.id and a.date=b.date then 0 else 1 end as varx from datasetA as a, datasetB as b; quit;

I get a timeout (OUT OF RESOURCES error). Any idea on what I am doing wrong here?


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