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: testing date

Re: testing date

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 4 Aug 1998 06:18:14 GMT
Message-ID: <6q6936$4tl$1@news02.btx.dtag.de>


Hi,

this won't work as suspected since sysdate also has a time portion.

declare
temp1 varchar2(1);
begin
  select 'X' into temp1 from my_table where trunc(my_date) = trunc(sysdate);
  exception when no_data found then
  message('No Records with today''s date!!'); end;

Prasad Chavali schrieb:
>
> I may be mis-understanding your problem...
>
> are you looking for this code?
>
> declare
> temp1 varchar2(1);
> begin
> select 'X' into temp1 from my_table where my_date = sysdate;
> exception when no_data found then
> message('No Records with today''s date!!');
> end;
>
> HTH
>
> Prasad Chavali
>
> Ed Lufker wrote in message <6q4sff$8f9$1_at_sloth.swcp.com>...
> >Hi All:
> >
> >
> >Does anyone have any pl/sql code that tests the date in a column and
> >compares it to todays day.
> >
> >
> >thanks in advance for any help
> >
> >eddie lufker
> >

--

Regards

Matthias Gresz :-)

--
Matthias.Gresz_at_Privat.Post.DE

          /|
         / |        
        /| |\
       /||  |\
      / O    |\         
     |        |\ Galopping Horse beats Running Man.
    /          |\
   /      /     |\
  /    __/|      |\
  \°   /  |       |\
   \/_/   |        |\

Received on Tue Aug 04 1998 - 01:18:14 CDT

Original text of this message

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