Date: Fri, 20 Jun 2003 16:24:31 -0400
Reply-To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Subject: SQL: delete rows based on a column being like-compared to other
rows
I have some metadata that is generated for me.
The metadata are like strings used to extract data for specialized
reporting.
Some of the metadata can cause one row to be reported more than once, which
I don't want.
In the following example I would want to 'reduce' the three rows to just one
row
data foo (label='Valley girl');
length like $20;
input like ;
cards;
jabba
jabba%
jabba%the%hut%
;
run;
proc sql;
delete from foo
where like < could be matched by any other different like >
;
quit;
jabba% should remain
"jabba" is like 'jabba%' and should be removed from use as metadata
"jabba%the%hut" is like 'jabba%' and should be removed from use as metadata
Any suggestions ?
--
Richard A. DeVenezia, http://www.devenezia.com