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 (October 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 30 Oct 2008 14:08:57 -0700
Reply-To:   Akshaya <akshaya.nathilvar@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Akshaya <akshaya.nathilvar@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: bug in proc sql?
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

When I renamed the NAME variable in the outer query's From Clause and selected NAME from the non-correlated subquery, guess what SAS exactly complains about the absence of name field in the previously created data file.

Proc sql ; * Create a table with just the ages of the girls. ; create table class_girls as select age from sashelp.class where sex = 'F' ; * Why doesn't this complain about the lack of a name field in the class_girls dset? ; * Instead it just returns everyone in sashelp.class. ; select * from sashelp.class(rename=(name=oldname)) where oldname in (select name from class_girls); Quit ;

Log: ERROR: The following columns were not found in the contributing tables: name.

But, when I also selected OLDNAME instead of just NAME in the non- correlated subquery SQL selects all records as did before. select * from sashelp.class(rename=(name=oldname)) where oldname in (select oldname from class_girls);

Any SAS Gurus aware of this issue, please explain.

Thanks! Akshaya


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