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 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 2 Jan 2008 12:44:16 -0500
Reply-To:     Wensui Liu <liuwensui@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Wensui Liu <liuwensui@GMAIL.COM>
Subject:      Re: Macro Variable in proc sql
Comments: To: Shounak <shounak.adgaonkar@thrivent.com>
In-Reply-To:  <200801021730.m02BkiEa002845@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

i don't think sql will cause problem. more likely there might be error in your code.

On Jan 2, 2008 12:30 PM, Shounak <shounak.adgaonkar@thrivent.com> wrote: > Guys, I have a question...can we use the macro variable declared outside > the scope of proc sql in sql code...because i tried it did not work... > lemme give a code so that it will be more clear > > %let year1=2006; > proc sql; > create table new as > select amount, account from data1 where year=&year1; > quit; > > it gives me error that the apparent symbol year not resolved... declaring > the macro variable inside proc sql works but i dont want that as purpose > of my program is just to change the value of year everytime n you will get > the year specific results... > Any suggestions appreciated > > Thanx > > Shaunak >

-- =============================== WenSui Liu Statistical Project Manager ChoicePoint Precision Marketing (http://spaces.msn.com/statcompute/blog) ===============================


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