Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: testing date
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