constantlearner
constantlearner

Reputation: 5247

inserting value in long raw column

I am required to test something with a long raw column in Oracle DB. For this I need to insert a value of length, say 4000, in that column. The data can be something simple like "AAAA ..." 4000 times. I tried inserting a large value using sqlplus but get the following error (perhaps due to length limitations in sqlplus ?

ERROR: ORA-00972: identifier is too long

Is it possible to insert a large value into the long raw column using sqlplus ?

Upvotes: 2

Views: 1433

Answers (2)

Orangecrush
Orangecrush

Reputation: 1990

This is a limitation of sqlplus where the input cannot be more than 2499 characters.

I would suggest that you do the insert as part of a two step process.

  1. Insert data into the table.column but keep the data less then 2500 characters.
  2. Update the same column and concatenate the rest of the data to the already inserted data.

Not an ideal scenario, but as far as I can see, this is the only way if you want to use sqlplus.

Upvotes: 2

Egor Skriptunoff
Egor Skriptunoff

Reputation: 23737

In Oracle, "AAA" is an identifier, and 'AAA' is a string value.

Upvotes: 2

Related Questions