Re: LENGTH function and trailing spaces
Posted in 1995
Kirk Bradley - Mainframe and Integration Technologies (kbradley@130.35.1.6) wrote:
: Sorry.. I didn't mean the dictionary length. I meant the length for each
: row. i.e. the length of a column as stored on disk. If I store 'KIRK '
: and 'KIRK' I'd expect length(name) to give me 4 in both cases (cause
: it ignores trailing spaces) but I'd like to know if there is a SQL
: expression I can use to return 5 and 4. i.e. the length I would get
: if I fetched this column into a C program.
LENGTH() works in an SQL statement as well. I just did:
SELECT last_name, LENGTH(last_name) FROM table
ORDER BY 2
and it worked fine.
I think it's been in relatively early engine versions.
=======================================================================
Dennis J. Pimple dennisp@informix.com Opinions expressed
Senior Consultant -------------------- are mine, and do not
Informix Software Inc Voice: 303-850-0210 necessarily reflect
Denver Colorado USA Fax: 303-779-4025 those of my employer.