Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT command
Message
 
To
16/04/2000 11:50:21
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00360123
Message ID:
00360240
Views:
8
>I have to SELECT from a SQL server table on a field of char. 7
>I do my SELECT and say something like this:
>
>l_cSQL = "SELECT *"
>l_cSQL = l_cSQL + " FROM Table"
>l_cSQL = l_cSQL + " WHERE myfield LIKE '"+ALLT(ThisForm.myProperty) + "%'"
>
>and the value of myProperty is '01'
>
>Now the problem with this is it will retrieve '011' or '0122' or wherever is after that. I don't want that. I only want the value of '01'
>What function can I use to do this? Or how can I say that in my SELECT?

Edgar,

It is giving you exactly what you asked for, LIKE "01%" says all fields where the value is "01" followed by anything. If you want just "01" then ask for = "01"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform