Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Count numbers
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01310475
Message ID:
01310484
Views:
14
>>the lenth of my filed(chr) is 11. some entry in this filed as =11 some are less than 11. now i want to selct records which is less than 11.
>>
>>in filed=345678901
>>=12345678
>>I want slect scond record
>
>
select * from myTable where LEN(myField) < 11
&& Not Rushmore optimizable
>
>This is if myField is character. If it's numeric, you would need to use
>
>LEN(transform(myField))<11

LEN(MyFIeld) always have the same value (the defined one) :-)
But LEN(ALLTRIM(MyField)) is another question :-)
Also if the field is numeric better test for:
MyField < 100000000000 (did I count zeros well?) and that will be optimizable (If you have index of course :-))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform