General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only