Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL and & a better way?
Message
From
12/05/2004 11:33:22
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00903127
Message ID:
00903200
Views:
28
TEXT TO x TEXTMERGE NOSHOW
SELECT * ;
FROM TABLE <> ;
into cursor temp
ENDTEXT
x = CHRTRAN( m.x, CHR(9)+CHR(10)+CHR(13)+";", "" )

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

Click here to load this message in the networking platform