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: Cale, Rick T (Richard) <RICHARD.T.CALE_at_saic.com>
Date: Fri, 17 Nov 2000 06:08:11 -0800
Message-Id: <10683.122368@fatcity.com>


I have to ask. Why are you accepting a date field and passing it into a number field.
Also I think you would have to exec by exec den1(&&datehired) not sure = on
that one though.

Rick

> -----Original Message-----
> From: bunyamin karadeniz [SMTP:bunyamink_at_havelsan.com.tr]
> Sent: Friday, November 17, 2000 8:10 AM
> To: Multiple recipients of list ORACLE-L
> Subject: interesting ...

>=20

> I have a stored procedure =20
> =20
> =20
> PROCEDURE den1 (a IN number) as
> b number;=20
> begin=20
> b :=3D a;=20
> dbms_output.put_line(b*5);
> end;
> =20
> And I use accept command of sql plus.=20
> =20
> ACCEPT datehired DATE FORMAT 'dd/mm/yy' DEFAULT '11/11/1111' PROMPT
> 'enter the date:' ;
> I enter 11/12/99 when asks me to enter the date .
> =20
> Wrote define and seen that datehired parameter is char.
> =20
> And then I executed the den1 procedure by passing the datehired =
parameter
> (which is date ) by=20
> EXEC den1(&datehired);=20
> =20
> And did not give an error although it had shown that ( when =FD wrote
> define) 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

> =20
> =20
> =20
> =20
> =20
> =20
> =20
> =20
> =20
> =20
> =20
> =20
> =20
> =20
> =20
> =20
> **********************************************
> Bunyamin K. Karadeniz
> Enformasyon Teknolojileri Dir.
> Veri Taban=FD Grubu tel : 2873565/1681
Received on Fri Nov 17 2000 - 08:08:11 CST

Original text of this message

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