Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Newbie: 'identifier must be declared' when deleting from table
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