Date: Fri, 1 Oct 2004 09:49:20 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: about cartesian
William -
To add to Ian's sage advice, you might want to take a look at natural joins,
they are somewhat like a normal datastep merge. If you have a single
unique id on both tables, or a set of unique variables on both tables, with
the same name and type, then a natural join merges the two tables 1-1 based
on just those IDs.
Here is the SASdoc on joins:
http://support.sas.com/onlinedoc/912/getDoc/proc.hlp/a002473691.htm
hth
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of william
Sent: Thursday, September 30, 2004 1:00 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: about cartesian
Hi,there
I am a beginner in SAS "proc sql".Normally,I use the data step,but
recently,for some reason,I began to use the "proc sql".When I ran my
sql program,I ofen found the following message in my log:
"NOTE: The execution of this query involves performing one or more
Cartesian
product joins that can not be optimized."
The cross join cost a lot of time.So could anyone summary some
experience about how to avoid the cartesian join.
Thanks
William
|