Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Cast from varchar2 to nvarchar2

Re: Cast from varchar2 to nvarchar2

From: hpuxrac <johnbhurley_at_sbcglobal.net>
Date: Mon, 04 Jun 2007 14:45:55 -0700
Message-ID: <1180993555.441500.9800@o5g2000hsb.googlegroups.com>


On Jun 4, 4:46 pm, vyacheslav.vasyl..._at_gmail.com wrote:
> I'm having a problem casting a column. I have something like this:
>
> SELECT CAST(column1 AS nvarchar2(20)) FROM Table1
>
> column1 is of type varchar2(20). Also, cannot cast numeric values to
> nvarchar2. I'm running Oracle 8i.
> Is this type of cast illegal? Is there any way to cast to nvarchar2?
> Any help would be appreciated.
> Thanks in advance.

Well it seems to work for me using 10.2.0.3 and 9.2.0.8 so that's the good news.

If I remember correctly the cast stuff came out in 8 as part of the object oriented extensions. Probably a lot of problems with the code and/or qualifications about exactly how it could be used in the first couple of releases ... I would guess that most of the limitations might have been fixed early in 9.2.

Check out the oracle documentation for the version you are currently running and look for a supported invocation then see if you can build a test case that fails with what is supposed to be supported.

Could be conceivably that your version of sqlplus client is different from server database version also I suppose. Received on Mon Jun 04 2007 - 16:45:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US