|Date: ||Thu, 22 Aug 2002 12:33:34 -0400|
|Reply-To: ||Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>|
|Subject: ||Re: Proc sql question.|
On Thu, 22 Aug 2002 08:55:29 -0700, Steve <steve.silver@SUNTRUST.COM> wrote:
>email@example.com (CKalisetty) wrote in message
>> 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
>> fine with out any macro variables. That is when instead of &m.&y. ,
>> 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;
>Can you see what your macro variables are resolving to? Try coding
>mprint mlogic symbolgen in your options statement to show you how the
>macro variables are resolving and provide that information.
are you sure that you tried
execute (delete from test1 where date="072002") by sybase; ???
or did you try
execute (delete from test1 where date='072002') by sybase;
That might be a difference, because not SAS is interpreting that, that is
If that is the problem, you can try what SYBASE means to ''072002''