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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: interesting ...

Re: interesting ...

From: Jared Still <jkstill_at_bcbso.com>
Date: Fri, 17 Nov 2000 12:02:20 -0800 (PST)
Message-Id: <10683.122411@fatcity.com>


On Fri, 17 Nov 2000, bunyamin karadeniz wrote:

> PROCEDURE den1 (a IN number) as
> b number;=20
> begin=20
> b :=3D a;=20
> dbms_output.put_line(b*5);
> end;

>=20
> ACCEPT datehired DATE FORMAT 'dd/mm/yy' DEFAULT '11/11/1111' PROMPT 'ent=
er the date:' ;
> I enter 11/12/99 when asks me to enter the date .
>=20
> And then I executed the den1 procedure by passing the datehired paramete=
r (which is date ) by=20
> EXEC den1(&datehired);=20

>=20
> And did not give an error although it had shown that ( when =FD wrote def=
ine) it is a char parameter and I wanted to pass a char to a number ..

>=20

> Result is interesting .
>=20

> ,0462962962962962962962962962962962962963 which is equal to 11/12/99.
>=20

> Why ????
> Why did the procedure take the char '11/12/99' as a number 11/12/99 ??
> =20

>=20

Your input parameter is a number. Oracle is doing an implicit conversion on your parameter.

Jared Still
Certified Oracle DBA and Part Time Perl Evangelist ;-) Regence BlueCross BlueShield of Oregon
jkstill_at_bcbso.com - Work - preferred address Received on Fri Nov 17 2000 - 14:02:20 CST

Original text of this message

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