Thanks Patrick, your code resolved bit of my requirement, now I need the values in quotes, for that I have used following code:  %macro build_filter_display(varname);  (  %let test=;  %do i = 1 %to &&&varname._Count.;  %if &i = 1 %then  %if %nrbquote(%trim(&&&varname)) eq %nrbquote() %then '-1';  %else %let test=%trim(%nrstr(%")%nrstr(%trim(&&&varname)).%nrstr(%"));  %else  %if %nrbquote(%trim(&&&varname&i.)) eq %nrbquote() %then '-1';  %else  %let test=&test,%str( )%nrstr(%")%trim(%nrstr(&&&varname).&i)%nrstr(%");  %end;  %unquote(&test)  )  %mend;  /*%build_in_statement_oracle2;*/  %put Test in %build_in_statement_oracle(STP_TEST);     which is generating outcome as:      may be that highlighted bit causing issue in my oracle query  MPRINT(BUILD_FILTER_DISPLAY): (  MPRINT(BUILD_FILTER_DISPLAY): "BA - Label Claim - Mean - 1DP - 50 %","BA - Label Claim - Minimum- 1DP - 50 %","BA - Label Claim - Maximum - 1DP - 50 %" )  ERROR: ORA-00972: identifier is too long.     any help is appreciated.     Thanks 
						
					
					... View more