20

Hi I am using a delete query in my shell script and I am facing this issue.

   delete from WHITELIST_CLI where filecode like'%Line_Index_condense%';

Error:

 ERROR:
 ORA-01741: illegal zero-length identifier
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
Purple
  • 301
  • 1
  • 2
  • 6
  • 5
    Are you sure this error is being caused by this statement? It looks perfectly fine, and [this SQLFiddle](http://sqlfiddle.com/#!4/edf19/1/0) shows the same. There has got to be something more going on here... – Mureinik Aug 16 '14 at 08:35
  • Oracle errors deserve oracle tags. – Gordon Linoff Aug 16 '14 at 11:27
  • 3
    Smells like an issue with how you escape `'`. Show us your shell script – Andomar Aug 16 '14 at 11:29

1 Answers1

37

Here is some information on the error:

ORA-01741: illegal zero-length identifier

Cause: An attempt was made to use two double quotes ("") as an identifier. An identifier must be at least one character long.

Your query has nothing of the sort. This may be an interaction between ksh and Oracle. Or you may have used double quotes when you mean single quotes. Or, you may have oversimplified the query when you posted the question. Or another query may be the issue.

Here is a simple example of the error on SQL Fiddle.

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
  • 8
    If it helps other people, I got this error when copying a big SQL query that had been pasted into Excel - it doubled my "s up in a column name (SELECT blah AS ""Blah/Blah"" FROM Table). Thanks for the answer - it helped. :) – FrostbiteXIII Jun 01 '15 at 08:57