Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A little tip
Message
From
06/09/2003 18:16:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/09/2003 12:24:06
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00826775
Message ID:
00826818
Views:
23
Personally, I always use LEFT() when extracting only part of a fixed-sized field.

padr() can be used to guarantee that a variable-length expression (for instance, a memo field, or an expression like alltrim(MyField)) has a fixed length. LEFT() is unrealiable in this case.

Regards,

Hilmar.

>Hi,
>
>On a SELECT for control the size of a result char field, with left alignment,
>the normal code used is:
>
>SELECT PADR(cExp,LenResult) ....
>
>
>You can use
>
>SELECT LEFT(cExp,LenResult) ....
>
>
>It is faster.
>
>Fabio
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform