[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Length of data in a field



the following command should give you what you are looking for:

select max(length([column_name])) from [table_name];

> -----Original Message-----
> From: Sam Spritzer [SMTP:SSpritzer@GW.CTG.COM]
> Sent: Friday, March 26, 1999 1:56 PM
> To:   Multiple recipients of list SQR-USERS
> Subject:      Length of data in a field
>
> I have a NAME field that is varchar2(40).  That field is in a table that
> is well over 10000 rows long.
> In building an SQR report, I am trying to squeeze as much as I can on one
> page.  I know that this field doesn't contain a value with 40 characters
> but I would at least like to know the longest value.
> I know SUBSTR is the safest bet, at least from SQRs perspective but I m
> wondering if any of you know any Oracle commands which will help determine
> the longest value in a field.
>
> Thanks in advance,
> Sam