Date: Wed, 27 Jun 2007 18:31:30 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: quote problem
In-Reply-To: <1182967419.181776.30910@m36g2000hse.googlegroups.com>
Content-Type: text/plain; format=flowed
Massive confusion of what %Quote does. %Quote masks certain symbols from
the macro processor it does not place double nor single quote marks around
values.
proc sql noprint inobs=5 ;
select Quote( code_pstl ) , Quote( nmbr_prvnc ) ,Quote( id_adrs )
into :aa, :bb, :cc
from ccis_cda.addresses;
Quit ;
Toby Dunn
If anything simply cannot go wrong, it will anyway. Murphys Law #2.
The buddy system is essential to your survival; it gives the enemy somebody
else to shoot at.
Murphys Law #
Tell a man there are 300 billion stars in the universe and he'll believe
you. Tell him a bench has wet paint on it and he'll have to touch to be
sure. Murphys Law #9
From: roch77@GMAIL.COM
Reply-To: roch77@GMAIL.COM
To: SAS-L@LISTSERV.UGA.EDU
Subject: quote problem
Date: Wed, 27 Jun 2007 11:03:39 -0700
my code :
%macro aaa;
proc sql noprint inobs=5;
select code_pstl, nmbr_prvnc, id_adrs
into :aa, :bb, :cc
from ccis_cda.addresses;
%let aa = %quote(&aa);
%put &aa, &bb &cc;
%mend aaa;
%aaa;
In the log file, I don't get &aa with double quotes around it. I want
something like : "H2K 3Z8"
I realize I am getting 5 rows back and I haven't specified a "into
list" , but I only want the first value.
I am using EG and the addresses table is in oracle(pass thru).
Why am I not getting double quotes around the value of &aa when I put
to log.
I am aware I can right it succinctly as
"select quote(code_pstl) ...."
thanks in advance..
_________________________________________________________________
Picture this – share your photos and you could win big!
http://www.GETREALPhotoContest.com?ocid=TXT_TAGHM&loc=us