Date: Mon, 19 Dec 2005 21:48:14 -0800
Reply-To: David L Cassell <davidlcassell@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David L Cassell <davidlcassell@MSN.COM>
Subject: Re: Proc SQL - referencing a library
Content-Type: text/plain; format=flowed
>My undersatnding (limited) is that in PROC SQL, "a.var," can refer to the
>variable called var in the dataset called a. What if the dataset called a
>in a library called "lib"? "lib.a.var" wont work (too many periods) - how
>I reference variable var in dataset a in library lib in Proc SQL?
Don't make things so hard. Take PROC SQL (and SQL in general) a line at a
First, make a table alias. So you have Var1 in data set lib.barf . Make a
in the FROM component, and use that:
from lib.barf as a;
But if you only have *one* data set, then you don't even have to work this
It's when you need to refer more than one data set that the table aliases
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Donít just search. Find. Check out the new MSN Search!