Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT - SQL command run over records in a file?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
SELECT - SQL command run over records in a file?
Miscellaneous
Thread ID:
00009707
Message ID:
00009707
Views:
82
I want to run several queries in a row. However, I don't want them hardcoded in a program.

What I did was build a query statement (without the word SELECT at the beginning) within a memo field in a file.

In my program, I ran the code:

=====================================================

select queryfile
do while !eof('queryfile')

SELECT DISTINCT queryfile.qrymemo

{process something if query finds a hit}

skip 1 in queryfile
enddo

=====================================================

The field qrymemo is my memo field containing the SQL statement.

I'm just winging this. Does anyone know how I can run a SELECT statement and substitute in the body of the SQL statement?

Any and all help is greatly appreciated.

Rob
Next
Reply
Map
View

Click here to load this message in the networking platform