|
Adel:
SAS SQL does not expand ranges of column variable names. You will find a number of postings in the outstanding SAS-L Archives on how to use metadata to expand and subset column variable names.
Standard practice in database programming calls for labels in data as opposed to long lists of column variable labels. Repeating columns do not fit well into relational database designs.
Sig
-----Original Message-----
From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of adel F.
Sent: Friday, October 14, 2005 10:33 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Proc SQL: Minimise the code using S1-S10
Hi;
Instead of writing
/*--------------------*/
proc sql;
create table Newdata as select distinct
data1.Region,M1,M2,M3,M4,M5,M6,M7,M8,M9,M10, F1,F2,F3,F4,F5,F6,F7,F8,F9,F10
from Mylib.data1, Mylib.data2
where data1.Region = data2.Region;
quit;
/*------I tried-------------*/
proc sql;
create table Newdata as select distinct
data1.Region,M1-M10,F1-F10
from Mylib.data1, Mylib.data2
where data1.Region = data2.Region;
quit;
but I got only 3 columns
It seems that SAS understand that I am asking for a difference.
How I can write this?
Thanks for any comments
Adel
---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez le ici !
|