Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an SQL statement from strings
Message
From
10/03/1999 16:42:41
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Creating an SQL statement from strings
Miscellaneous
Thread ID:
00196099
Message ID:
00196099
Views:
63
HI!
I am creating an SQL statement from strings and I don't know why this Select statement is not working. Code is as follows:

* creates an SQL statement
cTempSQL = 'select wcdet.wcnumber from wcdet' + ;
' INNER JOIN wceff ON wcdet.wcnumber = wceff.wcnumber' + ;
' INNER JOIN wcfreq ON wcdet.wcnumber = wcfreq.wcnumber WHERE ' + ;
cTempeff + ' AND (' + cTempfreq + ')' + 'Group by wcdet.wcnumber' + ;
'INTO CURSOR c:\temp\result'

* Executes select statement
&cTempSQL

I thought about using EVAL or EVALUATE but when I used it last time I ran into major problem. Eval or Evaluate for some reason didn't get rid of some object references and forms were not closing. I am hesitating to use these commands. Please advice if there is a better way of doing this.

THANKS.
Next
Reply
Map
View

Click here to load this message in the networking platform