Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an SQL statement from strings
Message
 
To
10/03/1999 16:42:41
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00196099
Message ID:
00196105
Views:
28
What you're doing should work. It looks like you may be missing a space between wcdet.wcnumber and INTO CURSOR... What happens when you run it? Do you get an error message? If so, what is it?

>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform