ORA-00997 Updating Long Raw Column

(Doc ID 1312577.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version 8.0.1 and later
Information in this document applies to any platform.
***Checked for relevance on 16th May 2016***


You are attempting to update a LONG RAW column using the resulting LONG RAW column from an embedded SQL statement similar to the following examples:

Example 1

UPDATE test_long1
SET data1 = UTL_RAW.CAST_TO_RAW((SELECT data2 FROM test_long2 WHERE id2 = 2))
WHERE id1 = 1;

Example 2

UPDATE test_long1
SET data1 = (SELECT data2 FROM test_long2 WHERE id2 = 2)
WHERE id1 = 1;

and you receive the following error:

ERROR at line 2:
ORA-00997: illegal use of LONG datatype


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms