ordendelfai
Technical User
This is a strange request, but I need to find a way to extract the top initial SQL code (text) up to the "FROM" portion of the statement, then extract the FROM SQL until the WHERE statement, and then extract the WHERE SQL text until the ; (cannot include the 
For example:
qry_SqlExtract
I am familiar with the MID and LEN functions, but I am not sure how to write code to search a query's SQL and only up to a certain word in the SQL...
If you can help, would really appreciate it ;-)
~Joel
As common courtesy and to help other members who might find your thread helpful in the future, please respond if the advice given resolved your issue.
For example:
qry_SqlExtract
Code:
[COLOR=green]Select Distinct table.field1,
table.field2[/Color]
[Blue]FROM table[/Blue]
[Purple]Where table.field1 = "C"[/Purple]
;
If you can help, would really appreciate it ;-)
~Joel
As common courtesy and to help other members who might find your thread helpful in the future, please respond if the advice given resolved your issue.