Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Fw: interesting ...
> I only tried it . Nowadays I will enter to OCP exams.. Not for a
specific
> aim..
> I tried your suggestion and gave the same result...
> **********************************************
> Bunyamin K. Karadeniz
> Enformasyon Teknolojileri Dir.
> Veri Tabanư Grubu tel : 2873565/1681
> HAVELSAN
> **********************************************
> ----- Original Message -----
> From: Cale, Rick T (Richard) <RICHARD.T.CALE_at_saic.com>
> To: <ORACLE-L_at_fatcity.com>; <bunyamink_at_havelsan.com.tr>
> Sent: Friday, November 17, 2000 5:08 PM
> Subject: RE: interesting ...
>
>
> 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 ...
> >
> > I have a stored procedure
> >
> >
> > PROCEDURE den1 (a IN number) as
> > b number;
> > begin
> > b := a;
> > dbms_output.put_line(b*5);
> > end;
> >
> > And I use accept command of sql plus.
> >
> > 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 .
> >
> > Wrote define and seen that datehired parameter is char.
> >
> > And then I executed the den1 procedure by passing the datehired
parameter
> > (which is date ) by
> > EXEC den1(&datehired);
> >
> > And did not give an error although it had shown that ( when ư wrote
> > define) it is a char parameter and I wanted to pass a char to a number
..
> >
> > 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 ??
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > **********************************************
> > Bunyamin K. Karadeniz
> > Enformasyon Teknolojileri Dir.
> > Veri Tabanư Grubu tel : 2873565/1681
Received on Mon Sep 18 2000 - 08:44:36 CDT
![]() |
![]() |