Re: dbaccess sql question
Posted in 1994
> >>> >> Also, is there a way, using SQL under dbaccess, to strip off trailing
> >>> >> blanks from columns selected?
>
> >>> If you use the CLIPPED statement behind the column name it keeps
> >>> the output to the column length and not the column name.
>
> >>> e.g. select stock_class CLIPPED from tabname
>
> what version of informix did you find this in? it's not in 5.
It's not documented in V6 either. In fact this syntax just renames
the stock_class column to clipped.
CLIPPED is a 4gl function and can only be used after retrieving data
from the database. There is a real need for a clip style function in
Informix SQL as without it the || concatenation operator is not much
use. It could be implemented in either of the following ways:
select clipped(stock_class) || " " || stock_name stock_clip from
tabname
select stock_class[1,(length(stock_class) + 1)] || stock_name
stock_clip from tabname
Either method would be fine but the second would be much more usefull.
Can anyone at Informix tell us when this feature request might bubble
to the top of the list. I believe it's been in there for a couple of
years.
Cheers - Jim
My opinions are my own. They may vary with time but they remain MINE!
----------------------------------------------------------------------
Name: Jim Gordon Company: DHL Systems Inc, Burlingame, CA, USA
----------------------------------------------------------------------