0

I'm running hundreds of SQL DELETE statements in a single go within a BEGIN - END block in Oracle DB. I need to ignore the bind variables to treat the complete text as values.

Using Set define off doesn't help as it says

BIND variable not declared

Any help on this to run all the delete statements without bind variable errors. A portion of SQL is below.

SET DEFINE OFF       
BEGIN       
    DELETE FROM CLOOKUP WHERE PKID='294569246' AND VALUE ='Myco :Zear';       
    DELETE FROM CLOOKUP WHERE PKID='245342523' AND VALUE ='Asta :Ochra';    
    DELETE FROM CLOOKUP WHERE PKID='947893478' AND VALUE ='Isomene';    
    DELETE FROM CLOOKUP WHERE PKID='947893478' AND VALUE ='T-Acid & Methyl';        
END;    
Littlefoot
  • 131,892
  • 15
  • 35
  • 57
Osceria
  • 345
  • 2
  • 14
  • Refer https://stackoverflow.com/questions/43876365/why-is-set-define-off-not-working-for-the-colon-character – Kaushik Nayak Mar 05 '18 at 17:03
  • 2
    Which tool do you use to run that PL/SQL block? I tried it in SQL*Plus as well as SQL Developer - no problem whatsoever. `SET DEFINE OFF` took care about both colon and ampersand. – Littlefoot Mar 05 '18 at 20:53

0 Answers0