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: Date ... Date ...Da

Re: Date ... Date ...Da

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Thu, 15 Apr 2004 00:04:29 -0700
Message-ID: <1082012657.530813@yasure>


moon wrote:

> Hi All,
>
> I don't know why Oracle complicating the issue of implicit and
> explicit converion, I think if they follow the same pattern of Java
> then it would be much better to deal with. Whatever, My question is
> about the following parg I read from Oracle SQL REf. and it says the
> following:
>
> "During arithmetic operations on and comparisons between character and
> noncharacter datatypes, Oracle converts from any character datatype to
> a
> number, date, or rowid, as appropriate. In arithmetic operations
> between
> CHAR/VARCHAR2 and NCHAR/NVARCHAR2, Oracle converts to a number."
>
> According to the Ref this should executes successfuly:
>
>

>>select '12-AUG-19' - sysdate from dual

>
>
> but i got this error:
>
>
>>ORA-00932: inconsistent datatypes: expected CHAR got DATE

>
>
> Why ? Why?
>
> Thank you very much for your help in advance
>
> Note:
> The NLS_DATE_FORMAT is 'DD-MON-RR'
>
> :)

If some of us had our way ... no programming language would ever do implicit conversions to keep lazy developers from writing bad code.

Just write good code and you'll never have to think about it again.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Apr 15 2004 - 02:04:29 CDT

Original text of this message

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