ORA-00972 Identifier too long on deletion

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pete
Posts: 5
Joined: Fri 10 Aug 2007 07:16

ORA-00972 Identifier too long on deletion

Post by pete » Thu 23 Aug 2007 13:06

Hi,

When I perform a delete on a TOraQuery with a long primary key field name it comes up with the error: ORA-00972 Identifier too long.

The SQL that comes up in debug mode is:
----------
DELETE FROM DD_GROUPINGAPPLICATIONFIELD
WHERE
GROUPINGAPPLICATIONFIELDKEY = :Old_GROUPINGAPPLICATIONFIELDKEY

:Old_GROUPINGAPPLICATIONFIELDKEY(FLOAT,IN)=89
----------

I expect it's the Old_GROUPINGAPPLICATIONFIELDKEY variable being more than 30 chars. The TOraQuery is putting Old_ as a prefix pushing it over the 30 char limit. Is there a way around this rather than having to shorten the primary key?

Thanks
Pete.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 27 Aug 2007 07:30

You can include ROWID into your SELECT statement. In this case ROWID will be used in queries for delete and update.

Post Reply