Re: how to convert datatypes ?
Posted in 1996
Michael,
once again you're just blaming your ignorance of the language on the
language itself.
As you have probably guessed, you can't add strings, you concatenate them, and
in SPL (at least, I guess is SPL that you're talking about) the correct
operator is || (double pipe)
cut down on the caffeine :-)
Marco
____________________________________________________________________________
rem radioterapia, which I immeritately manage, seldom agrees with what I say
marco greco (Catania, Italy) Work:
marcog@ctonline.it rem radioterapia 39 95 447828 fax 446558
(was mar.greco@agora.stm.it) Achea 39 95 503117
--- On 2 Dec 1996 19:25:44 GMT Michael Agbaglo <byteshif@cs.tu-berlin.de>
wrote:
Dennis Collin <dcollin@connix.com> schrieb im Beitrag
<57tm8g$bi0@beast.connix.com>...
> "Michael Agbaglo" <byteshif@cs.tu-berlin.de> wrote:
>
> >First I had to write extra code because this amateur programmers a
informix
> >weren't able to implement select ... into ... order by.
>
> >Then I browsed the manuals for 'convert' w/o success. When I do a
> >LET Stmt = VARCHAR( foo );
> >it thinks VARCHAR is a procedure --- Arrgh!
> >Then I browsed for string functions - nothing, no MID, LEFT, RIGHT...
> >Have they been exhausted by implementing 'LENGTH' ?
>
> Informix performs data conversions (integer to string, etc)
> implicitly! Just make the assignment, and informix does the rest:
>
> DECLARE string_variable STRING(7)
> DECLARE integer_variable INTEGER
>
> LET string_variable = integer_variable
create procedure foo()define i integer;
define s string;
let s = "asdfsa" + i + "dsgdfsg";
end procedure;
1213: implicit character to numeric conversion
REALLY NICE !
-----------------End of Original Message-----------------