General information
Category:
Coding, syntax & commands
Title:
Creating an SQL statement from strings
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only