Date: Fri, 14 Mar 2003 09:37:36 -0600
Reply-To: Rodney Sparapani <rsparapa@MCW.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Rodney Sparapani <rsparapa@MCW.EDU>
Organization: Medical College of Wisconsin, Milwaukee
Subject: Re: what is wrong with this??
Content-Type: multipart/mixed;
This is a multi-part message in MIME format.
--------------060005040501070802060203
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
peter wrote:
>I have written many, many programs in sas version 6.12 containing
>sql-code like :
>proc sql;
> create table test as
> select * from a ,c
> where a.a=c.a
> outer union corr
> select * from b ,c
> where b.a=c.a;
>and there was never a problem concatenating two queries this way, but
>... in verion 8.2 I get the errors below.
>
>Please somebody tell me : What is wrong?
>
>
I cleaned up the syntax error, but I get results that are probably not
what you want (.sas and .lst attached). By the way, I translated your
.log to .sas code with the command ess-sas-transcript which is a new
feature in ESS 5.1.24 available @
http://software.biostat.washington.edu/ess/
--
Rodney Sparapani Medical College of Wisconsin
Sr. Biostatistician Patient Care & Outcomes Research
rsparapa@mcw.edu http://www.mcw.edu/pcor
Was 'Name That Tune' rigged? WWLD -- What Would Lombardi Do
--------------060005040501070802060203
Content-Type: text/plain;
name="sql.sas"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="sql.sas"
/*5*/ data a;
/*6*/ a=0; b=2; output;
/*7*/ a=1; b=3; output;
/*8*/ a=2; b=2; output;
/*9*/ a=3; b=2; output;
/*NOTE: The data set WORK.A has 4 observations and 2 variables.*/
/*NOTE: DATA statement used:*/
/* real time 0.00 seconds*/
/* cpu time 0.00 seconds*/
/*10*/ data b;
/*11*/ a=0; c=2; output;
/*12*/ a=1; c=5; output;
/*13*/ a=2; c=67; output;
/*14*/ a=5; c=28; output;
/*NOTE: The data set WORK.B has 4 observations and 2 variables.*/
/*NOTE: DATA statement used:*/
/* real time 0.02 seconds*/
/* cpu time 0.01 seconds*/
/*15*/ data c;
/*16*/ a=0; output;
/*17*/ a=2; output;
/*18*/ a=3; output;
/*19*/ a=5; output;
/*20*/ a=6; output;
/*21*/ run;
/*NOTE: The data set WORK.C has 5 observations and 1 variables.*/
/*NOTE: DATA statement used:*/
/* real time 0.01 seconds*/
/* cpu time 0.01 seconds*/
/*22*/ proc sql;
/*23*/ create table test as
/*24*/ select a.a, a.b from a ,c
/*25*/ where a.a=c.a
/*26*/ outer union corresponding
/*27*/ select b.a, b.c from b ,c
/*28*/ where b.a=c.a;
quit;
proc print;
run;
data abc;
merge a b c;
by a;
run;
proc print;
run;
--------------060005040501070802060203
Content-Type: text/plain;
name="sql.lst"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="sql.lst"
09:29 Friday, March 14, 2003 1
Obs a b c
1 0 2 .
2 2 2 .
3 3 2 .
4 0 . 2
5 2 . 67
6 5 . 28
/export/home/rsparapa/sql.sas
09:29 Friday, March 14, 2003 2
Obs a b c
1 0 2 2
2 1 3 5
3 2 2 67
4 3 2 .
5 5 . 28
6 6 . .
/export/home/rsparapa/sql.sas
--------------060005040501070802060203--