sql text field
Ben Pfaff
pfaffben@msu.edu
30 Nov 2000 09:16:41 -0500
"Marcel Kunath" <kunathma@pilot.msu.edu> writes:
> 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.
What SQL server? I'm only familiar with PostgreSQL.
> 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
Try `varchar' in place of `char'.