>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)