Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing quote in a TexT List

Status
Not open for further replies.

xwawa

IS-IT--Management
Jul 4, 2006
2
FR
Hi all,
I've got a dataset got following fields.

PART | VALUE | COLOR

This dataset is used by a gchart procedure to make a pie.
(following code)

proc gchart data=stat;
%if &titre ne %then %do;
title "&title";
%end;
&type. part /
sumvar=percent
legend=legend1
noheading
other=5
otherlabel="Divers"
coutline=black
value=arrow
angle = 10
midpoints= %trim(&lst_part)
%if &type.=PIE3D %then %do;
explode= %trim(&lst_part)
%end;
;
format percent pctfmt.;
run;


I want use values of PART field to make a list (lst_part)
For example, I have data like this
PART VALUE COLOR
1. spec 50 1
2. l'heure 32 2


To create my list, I do the following thing

proc sql noprint;
select part into: lst_part separated by "' '" from &table_in;
quit;

%let lst_part = %str(%')&lst_part%str(%');

I've got :
lst_part = 'spec''l'heure'

And when Gchart is running i take an error cause ' in "l'heure"

I wonder if there is a solution to resolve that problem !
Thank u in advance

 
Use double quotes (") instead of the single quote (') to surround the entire string.
 
Perfect !
I find this solution ! and it works perfectly
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top