Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC with Inner Join
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Firebird
Miscellaneous
Thread ID:
01234927
Message ID:
01234985
Views:
16
>Another one.. this one works
>
>TEXT TO lcSQL NOSHOW PRETEXT 15
>    Select * from "Pay Batch" WHERE RTRIM(Month)= 'June' AND YEAR = 2007
>ENDTEXT
>
>
>This one not
>
>xMonth = 'June'
>xYear = 2007
>TEXT TO lcSQL NOSHOW PRETEXT 15
>    Select * from "Pay Batch" WHERE RTRIM(Month)= xMonth AND YEAR = xYear
>ENDTEXT
>
You must use parameters for this:
xMonth = 'June'
xYear = 2007
TEXT TO lcSQL NOSHOW PRETEXT 15
    Select * from "Pay Batch" WHERE RTRIM(Month)= ?xMonth AND YEAR = ?xYear
ENDTEXT
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform