Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sting Manipulation problem with SQL
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00086804
Message ID:
00086836
Views:
22
>Shouldn't the select below return "5300" for the value?
>
>field1 = "CAMINO LOS REALES LOT#5300"
>
>select substr(field1,AT('#',field1)+ 1) from TABLE1 into cursor query
>
>All I am getting as a returned result is the first character of 5. I tried doing query below to force substr to return 10 characters after the number that the AT() function returns, but again all I get is the first character. I've tried several variations of this simple SQL but can't get it to return every thing to the right of the "#". If I use the command window and just use -> substr(field1,AT('#',field1)+ 1)
>the returned value is correct, but for some reason SQL doesn't work with this construct. Any help greatly appreciated.
>
>Thanks,
>
>John
We ran a query like yours just now and it returned all of the rest of the field.
We ran it on 2.6 fox. It worked the same from the prompt as it did
from a SQL statement.
We tested against a telephone number field in one of our dbfs and
asked for the numbers after the '-'. It returned four digits for
each record that had a phone number.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform