Ali Alwohaibi
Ali Alwohaibi

Reputation: 35

How to ignore responding to stored '&lt' and '&gt' text in Oracle SQL statement?

I have an issue when writing the sql query below in SQL Command line. It asks me "Enter a value for lt:" and then gives error

ORA-00933: SQL command not properly ended

I need to properly read the column that includes '&lt' or '&gt' as a string. How can I edit the query to make it works?

Delete from authorization1 
where role = 'staff' AND object = ' /department/gradstudent/gpa' 
AND predicate = ' & l t ; 2.0') AND action = 'read' 

Upvotes: 1

Views: 6345

Answers (1)

Justin Cave
Justin Cave

Reputation: 231791

Assuming you are using SQL*Plus or SQL Developer as your front end, this issue is that &foo is the syntax for defining substitution variables. You can

set define off;

before running your script to disable substitution variables. That will stop the front end from prompting you for a value.

Upvotes: 4

Related Questions