Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie: 'identifier must be declared' when deleting from table

Re: Newbie: 'identifier must be declared' when deleting from table

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Wed, 16 Jul 2003 20:39:40 -0700
Message-ID: <3F161A7C.B273CF42@exxesolutions.com>


Jim Kennedy wrote:

> "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;

Good point ... dates in Oracle are not strings.

Do a DESCribe on the table.

--
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)
Received on Wed Jul 16 2003 - 22:39:40 CDT

Original text of this message

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