Re: LENGTH function and trailing spaces
Posted in 1995
Table Column Lengths:
If you want the column lengths for any or all table
columns in your database just use a simple select.
The example is for just one table.
Example:
select colname,collength from systables, syscolumns
where systables.tabname = "Table_Name" andsystables.tabid = syscolumns.tabid
This select would give the column names and their defined
lengths. One Note: syscolumns.collength may not give you
the correct storage length for money and interval data types.
LIFE CAN BE SIMPLE.
Chuck Francis
----------
From: ilist
To: internet!rmy.emory.edu!informix-list
Subject: Re: LENGTH function and trailing spaces
Date: Wednesday, April 12, 1995 3:50PM
Now we're getting somewhere. Can you give me an example then
of why you'd ever use LENGTH in SQL? Especially since the
function will not allow an expression? I can't think of
anything particularly useful that LENGTH can do for me.
p.s. One reason to havethe REAL length of columns (not
the stripped length) is to be able to calculate how much
space a row takes on disk (you have to add in the column,
row and block overheads of course)
Kerry Sainsbury (kerry@kcbbs.gen.nz) wrote:
: In article <3m9he0$3dk@dcsun4.us.oracle.com>,
: kbradley@130.35.1.6 (Kirk Bradley - Mainframe and Integration
Technologies)
wrote:
: >
: > Is that clearer? Is it something anybody ever needs/wants to do?
: I can't imagine why you'd want to do this.
:
--------------------------------------,-------------------------------------
: Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ
: Quanta Systems, Auckland, New Zealand | kcbbs.gen.nz:/informix/*
: |
mathcs.emory.edu:/pub/informix/faq/*
: +64 9 377-4473 (work) 279-3571 (home) |
http://www.garpac.com/informix.html
--
Kirk Bradley
Oracle Corporation
Mainframe and Integration Technologies Group