Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: interesting ...
Oracle tries very hard to do what you tell it to do. It tries to do
automatic conversions where it can. This may be irritating behavior, but
there it is. You asked it to translate 11/12/99 into a number, which it
happily found that it could do, by treating the '/' characters as division
operators.
If you had tried it with '12-NOV-99' you would have received an error message.
Diana
-----Original Message-----
From: bunyamin karadeniz [mailto:bunyamink_at_havelsan.com.tr]
Sent: Friday, November 17, 2000 8:10 AM
To: Multiple recipients of list ORACLE-L
Subject: interesting ...
I have a stored procedure
PROCEDURE den1 (a IN number) as
b number;
begin
b := a;
dbms_output.put_line(b*5);
end;
.....
Result is interesting .
,0462962962962962962962962962962962962963 which is equal to 11/12/99.
Why ????
Why did the procedure take the char '11/12/99' as a number 11/12/99 ??