General information
Category:
Coding, syntax & commands
Title:
SQL and & a better way?
I am working on converting dos SQL's to VFP. In dos I built a string variable for the query.
X = "select * from table "
If Empty(somevar)
X = X + "into cursor temp"
Else
X = X + "where fieldname=variablename into cursor temp”
EndIf
&X
Something like that. It worked great, but I have been rewriting these statements using VFP. I know I can still do them the same way, but is there a better way?
I could write each query out into its own statement with all the conditions, but was curious if anyone else had a different idea on this.
Thanks,
Dale
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