Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie: 'identifier must be declared' when deleting from table
"Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message
news:3F15AA3F.AAB4DA9E_at_exxesolutions.com...
> Ian McCall wrote:
>
> > "Ian McCall" <ian_at_eruvia.org> wrote in message
> > news:IvfRa.12685$nP.10671_at_newsfep4-winn.server.ntli.net...
> > > Hello.
> > >
> > > I'm looking at Oracle after having used Sybase for a few years. I'm
trying
> > > to put a script together that deletes from a table where a particular
> > field
> > > is today's date in YYYYMMDD format.
> >
> > Apologies - should have added the version. It's 8i v8.1.6.0.0.
> >
> > Cheers,
> > Ian
>
> It appears that you don't own the table. You must, in this case, use the
fully
> qualified object name which is:
>
> schema_name dot table_name.
>
> --
> Daniel Morgan
> http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
> damorgan_at_x.washington.edu
> (replace 'x' with a 'u' to reply)
>
>
Additionally,Why are you converting a date to a string and then comparing it
to a field that in all likelyhood is a date?
begin
delete from target_table where archive_date> trunc(sysdate) and
archive_date<trunc(sysdate+1) ;
end;
Received on Wed Jul 16 2003 - 22:07:03 CDT