Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sqlconnect question
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00560172
Message ID:
00560214
Views:
15
This message has been marked as the solution to the initial question of the thread.
Why not just
SQLExec(lnHandle,"SELECT * FROM amcs_inventory_data where location LIKE '%"+ svar + "%'","Result1")

>Actually, I am dealing with ORACLE.
>
>>Timothy,
>>If your dealing with SQL Server, try the following statement:
>>
>>SQLExec(lnHandle,"SELECT * FROM amcs_inventory_data where CHARINDEX('" + svar + "', location) > 0","Result1")
>>
>>
>>CHARINDEX() is very similar to VFP's AT() function.
>>
>>HTH
>>>>>Is there some reason why the below statement does not work if I include svar?
>>>>>
>>>>>svar='RM 113'
>>>>>SQLExec(lnHandle,"SELECT * FROM amcs_inventory_data where;
>>>>>svar $ location","Result1")
>>>>>sele result1
>>>>>brow
>>>>
>>>>Try:
>>>>
>>>>
>>>>SQLExec(lnHandle,"SELECT * FROM amcs_inventory_data where " +;
>>>> "'" + svar "'$ location","Result1")
>>>>
>>>>Although I don't think the $ operator would be supported through the ODBC driver.
>>>
>>>I tried this and it comes back with "Function name is missing ). "
Previous
Reply
Map
View

Click here to load this message in the networking platform