>Put the whole where clause in the variable: > >IF you want to filter records > lcWhere = 'WHERE ' >ELSE > lcWhere = '' >ENDIF > >SELECT * FROM table (lcWhere) INTO CURSOR cTemp > >The string will either evaluate to blanks and you will not have a where clause which returns all records or whatever where clause you want which gives you only the filter condition. We do the same thing for joins and a lot of stuff in the SQL statement. > >You can also do it with a macro sub like &lcWhere if you want. > >MW
Strange, I don't think name expression would work here...