Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maximum length values from table
Message
From
12/06/2002 09:45:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00667331
Message ID:
00667334
Views:
23
>Hi there,
>
>I need to select each of the maxiumum length trimmed character strings from a table into variables so I can present it to a user. It will have to run on a large table so performance is an issue. Not sure wheather this can be done in a single SQL query or will need a scan through each field?
>
>Any info much appreciated!!
>
>Kind Regards,
>
>Simon Swan
select max(len(alltrim(MyField))) from MyTable
This is not R.Optimizable per se, but you can make it so (I believe) with an index on len(alltrim(MyField)).

Hilmar.
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
Reply
Map
View

Click here to load this message in the networking platform