RE: Trimming field data
Posted in 1995
Dean,
You're probably asking about the TRIM() expression that arrived, I
believe, in version 6.0. You can use it like:
SELECT TRIM(col_a) || TRIM(col_b)
FROM table...
Try it from dbaccess to see if it's available.
If, however, you're talking about removing the spaces from within
a program, then what language are you working with? In 4GL, you can
use the CLIPPED function. In "C", you can right a function to
work backwards through the string and add an ascii null where the
padding begins. It's all relative...
--Craig
>
> Can anybody tell me if there is a way to trim data in an informix
> database. I currently have data in a field that has spaces tagged onto
> the end of it and I would like to remove it.
>