Re: Variable Concatenation in SPL??
Posted in 2000
On Wed, 19 Apr 2000, Henderson, Scott wrote:
>
> Informix ver. - IDS 7.30
>
> I would like to append the value of a variable to another variable -
> strcat().
>
> For instance:
>
> DEFINE s_descr CHAR(255);
> DEFINE s_value CHAR(30);
>
> FOREACH
> select value
> INTO s_value
> from table>
> LET s_descr = s_descr || s_value; --does not work
> LET s_descr = s_descr || 'Howdy'; --if this can work why can't the
> preceeding?
>
> END FOREACH;
>
> RETURN s_descr;
>
LET s_descr = TRIM(s_descr) || TRIM(s_value);
Otherwise s_value will be beyond the end of s_descr. Saying that I dont
know why it is different when appending a literal though.
/J\\
--
Jonathan Stowe <mailto:Jonathan.Stowe@dircon.net> Analyst/Programmer,
Direct Connection Connection House, 9 Selsdon Way, Cityharbour, London E14
<http://www.dircon.net>