Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning all records with an SQL statement
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00582293
Message ID:
00582333
Views:
28
>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...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform