| Date: | Mon, 21 Oct 2002 10:55:01 -0300 |
| Reply-To: | Shane Hornibrook <shornibr@IS.DAL.CA> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Shane Hornibrook <shornibr@IS.DAL.CA> |
| Subject: | Re: "safe" merging? |
|
| In-Reply-To: | <2AE36192DC1E24479B195A804DE811B504ACB218@at0exc00.autoconnect> |
| Content-Type: | TEXT/PLAIN; charset=US-ASCII |
|---|
Is this too kludgy? YOu could even replace "Key" with a macro variable if
you want generic code.
proc sql;
create table done(drop=key_temp) as
select a.*, b.*
from dataseta as a, datasetb(rename=(key=key_temp)) as b
where a.key=b.key_temp;
quit;
run;
--Shane
Shane Hornibrook
GIS Analyst
Web: http://www.geologist.net
Mobile: 902.441.4158
On Mon, 21 Oct 2002, Goldman, Brad (AT-Atlanta) wrote:
>I have no idea if this is the situation Roland was originally referring to.
>Here is an SQL case where I feel the warning is not needed, and could be
>safely suppressed if there were an option to do so.
>
>I have two datasets, each one has a row per key and various vars. The list
>of actual variables can change at any time, and that is OK.
>
>proc sql;
>create table done as
>select a.*, b.*
>from dataseta a, datasetb b
>where a.key=b.key
>;quit;
>
>Results in the warning message: WARNING: Variable key already exists on
>table WORK.DONE.
>
>Certainly there are other ways to merge these datasets, but this seems to me
>a perfectly reasonable way to do it, and the warning IMHO is simply annoying
>and adds nothing. How could I suppress this? If you believe this warning
>shouldn't be suppressed, how would you suggest rewriting the SQL to not
>generate it? (Note that explicit lists of variables in the case is a bad
>thing, I want to keep the "a.*" style of naming variables.)
>
>Brad
>
|