Re: select from dual, typecasted
Date: Mon, 25 May 2009 08:00:13 -0700 (PDT)
On May 25, 7:49 am, "Laurenz Albe" <inv..._at_spam.to.invalid> wrote:
> jodleren wrote:
> > I need to typecast one item, as I select from dual union something
> > else...
> > select '1' as amount from dual
> > union select ....
> > where it should be:
> > select longvarchar('1') as amount from dual
> > how do I achieve that?
> Laurenz Albe
For other like me who did not recognize longvarchar it would appear to be an Oracle java type that corresponds to sqlj.runtime.CharacterStream which replaces the obsoleted AsciiStream and UnicodeStream types.
If the process allows consideration should be given to performing the data conversion from numeric to character in the Oracle union SQL statement itself via the to_char function. The to_char function can also be used to format the output to a fixed size using leading zeroes if useful or necessary to match up the data correctly.
HTH -- Mark D Powell -- Received on Mon May 25 2009 - 10:00:13 CDT