sql text field

Jeff Benton bentonje@msu.edu
Thu, 30 Nov 2000 09:07:34 -0500


Marcel,

Try this:

select max(len(convert(char(255),LibraryRequests)))) from courserequest

This worked fine with MS SQL Server (yes, I work in a MS shop) and I would assume
that MAX works with other DBMAs, as well.

Jeff



Marcel Kunath wrote:

> Hi,
>
> on sql server I got bunch of databases and in tables there are text fields. I
> need to find the maximum content in the fields.
>
>   select (len(convert(char(255),LibraryRequests))) from courserequest
>
> gives me the length of each entry up to 255 characters. I could then save the
> output in a file and scan each line and get that way the largest entry in
> length. Is there any other way to do it?
>
>   select max(len(convert(char(255),LibraryRequests))) from courserequest
>
> won't do it because it automatically goes for the 255 chars.
>
>  -- Marcel
> _______________________________________________
> linux-user mailing list
> linux-user@egr.msu.edu
> http://www.egr.msu.edu/mailman/listinfo/linux-user