Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL and & a better way?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SQL and & a better way?
Miscellaneous
Thread ID:
00903127
Message ID:
00903127
Views:
64
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
Map
View

Click here to load this message in the networking platform