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 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 16 Mar 2009 12:54:02 -0700
Reply-To:     Nancy <nancy0318@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nancy <nancy0318@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Is this query right?
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

Tables: Master table--Bless20079 (including duplicate records) subset table---Dif (including duplicate records) plan to creat table----rawcheck (still will have duplicate records)

Purpose: To pick up the records from master tables based on the same (last name +first name+ collected + result+ lab+lab_number) from the Dif table.

Method: Pick up the records based on the following conditions

proc sql; create table rawcheck as select Last_name, First_name, Birthday, Collected, Result, Lab, Lab_number from bless2007 where (last_name in (select last_name from dif)) and (first_name in (select first_name from dif) ) and (Collected in (select collected from dif)) and (Result in (select result from dif)) and (lab_number in (select lab_number from dif)) and (lab in (select lab from dif)) order by lab, last_name, first_name ; quit;

After i run it, I found some names not in Dif tables showed in the result.

Thank you!


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