LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 1998, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 26 Jan 1998 13:50:39 -0600
Reply-To:     Jack Hamilton <jack_hamilton@HCCOMPARE.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Jack Hamilton <jack_hamilton@HCCOMPARE.COM>
Subject:      Re[2]: SQL UPDATE question
Content-Type: text/plain; charset=US-ASCII

"kmself@ix.netcom.com" <kmself@ix.netcom.com> wrote:

>In SQL, when referencing data from two tables (or datasets) requiring >LIBNAME.MEMBER specification, you need to use a two-step method by >creating an alias for the table(s) involved: > >/* assume datasets MYLIB.FOO and YOURLIB.BAR each containing VAR */ > >Proc SQL; > select f.var, b.var > from mylib.foo as f, yourlib.bar as b /* define aliases */ > ;

This may not be start of the SQL standard, but in SAS, you can use the dataset name as the alias, provided it's unique.

So this works:

9 proc sql; 10 select one.x, two.y 11 from a.one, b.two;

but this doesn't:

14 proc sql; 15 select one.x, one.y 16 from a.one, b.one;


Back to: Top of message | Previous page | Main SAS-L page