lcWhere = '' IF SomeCondition lcWhere = 'WHERE abc = [123]' ENDIF lcExtraField = '' IF SomeCondition lcExtraField = 'zzz, ' ENDIF TEXT TO m.lcSQL TEXTMERGE NOSHOW SELECT abc, ; def, ; <<lcExtraField>> ; xyz ; FROM SomeTable ; <<lcWhere>> INTO CURSOR Something ENDTEXT lcSQL = ALLTRIM(CHRTRANC( m.lcSQL, CHR(13) + CHR(10) + CHR(9) + ";", " " )) &lcSQL>Hi. Doing a SQL where end-user has a choice of any number of options. Should I do a macro substitution. Is there a tutorial on this? Is there an easier way?