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 -> Newbie: 'identifier must be declared' when deleting from table

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

From: Ian McCall <ian_at_eruvia.org>
Date: Wed, 16 Jul 2003 17:59:12 +0100
Message-ID: <IvfRa.12685$nP.10671@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.

The SQL I'm using is:

declare

    v_today varchar(8);
begin

    v_today := to_char(sysdate, 'YYYYMMDD');     delete from target_table where archive_date = v_today; end;

I always get the following error:
 PLS-00201: identifier 'target_table' must be declared

Obviously, target_table is a table and isn't meant to be a declared variable. Could someone please point out what I'm doing wrong and how to fix the syntax of this?

Thanks in advance for any information,
Ian Received on Wed Jul 16 2003 - 11:59:12 CDT

Original text of this message

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