LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (August 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 22 Aug 2002 09:37:18 -0400
Reply-To:     "Goldman, Brad (AT-Atlanta)" <Brad.Goldman@AUTOTRADER.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Goldman, Brad (AT-Atlanta)" <Brad.Goldman@AUTOTRADER.COM>
Subject:      Re: Proc sql question.
Content-Type: text/plain; charset="iso-8859-1"

> I am trying to run the following code. Where macro variables &m and &y > represent the month and year. 'test1' is the table name.The > code is running > fine with out any macro variables. That is when instead of > &m.&y. , suppose we > put '072002'. But when we put in a macro it is saying that > "column name > '072002' not found". > Am I missing something here? > Is there something in the macro variables? > Can we use macro variables here? > Any help is greatly appreciated > proc sql; > connect to sybase (server=xxxxxx db=xxxxx user=xxxx password=xxxxx); > execute (delete from test1 where DATE="&m.&y.") by sybase; > quit;

Sekhar,

I think you have a quoting issue here. I would guess the code SAS is seeing (when you subsitute the macro variables) is DATE=072002, rather than DATE='072002' or DATE="072002". The first would be interpreted as looking for a variable call 072002, which would give the error you describe. I'm not very good with all the variants of quoting functions and single vs. double quotes, but this may put you on the right track for a fix.

-Brad


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