GAMP, Thanks for the suggestion I tried using '< !-- -->' but didn't work next time I will go with quotes ''.
Shakila, There are many ways to do this if you are getting multiple values from listbox and if you have your where clause is in FOCUS request then here is one way
'WHERE COUNTRY EQ &COUNTRY.(OR(FIND COUNTRY IN CAR)).COUNTRY.;'
The above code will be generated when you are using GUI to add a filter
if your where clause is in SQLPASS then this is one way
-*to replace "OR" with "," and to truncate spaces
'-TYPE COUNTRY -- &COUNTRY
-SET &COUNTRY = STRREP(&COUNTRY.LENGTH,&COUNTRY,4,' OR ',1,',',&COUNTRY.LENGTH,'A&COUNTRY.LENGTH') ;
-SET &COUNTRY = TRUNCATE(&COUNTRY) ;
-SET &CNTRY = '(' |&COUNTRY |')' ;
-SET &CNTRY = TRUNCATE(&CNTRY);
-TYPE CNTRY -- &CNTRY
-SET &COMPARE = TRUNCATE(&COUNTRY);
-SET &COMPARE = CTRAN (&COMPARE.LENGTH,&COMPARE,39,32,'A&COMPARE.LENGTH');
-SET &COMPARE = STRIP(&COMPARE.LENGTH,&COMPARE,' ','A&COMPARE.LENGTH') ;
-SET &COMPARE = TRUNCATE(&COMPARE);
-TYPE COMPARE -- &COMPARE;
-SET &SQLCNTRY = IF '&COMPARE.EVAL' EQ 'FOC_NONE' THEN ' ' ELSE 'AND COUNTRY IN ' | &CNTRY ;
-TYPE SQLCNTRY -- &SQLCNTRY ; '
Here you need to place this "&SQLCNTRY" variable in your SQL query
the input string for variable &COUNTRY will look like " 'ENGLAND' OR 'FRANCE' OR 'ITALY' "
and the output string for variable &SQLCNTRY will look like
" AND COUNTRY IN ('ENGLAND','FRANCE','ITALY') "
There are plenty of talented people on this forum who might suggest you in better way than me.
Rao.
WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio