Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trimming a field in a sql statment
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00407618
Message ID:
00408079
Views:
10
>The rtirm/ltrim or alltrim didn't work either, for some reason I dont think functions will work in the where statement. The only other way I can see this working is if I go back and trim all of my data in the database unless there is another way.
>Thanks Kelly

It may be because of the difference in lengths if you only use the trim functions on the left side of the equation.

Ex.
? rtrim(ltrim("hello ")) = "hello " && prints .F.
? "hello " = rtrim(ltrim("hello ")) && prints .T.

VFP uses the right side of the equation to determine how many characters to match. If the right side is longer then the two equations will never be equivalent.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform