0

I have a query like as below

INSERT INTO table_name (column1, ...)
VALUES ('a.jsp?action=delete&TASK_ID=%TASK_ID%', ...);

On executing it in SQLdeveloper, it's asking to enter the value of TASK_ID. How do I skip it and just enter it as a part of the value?

skr
  • 1,700
  • 1
  • 15
  • 39

1 Answers1

2

It is not the percentage sign, but ampersand. It says that you want to use a substitution variable (but you don't).

What to do? Prior to executing that insert, type set define off and execute it. Then run insert.

Littlefoot
  • 131,892
  • 15
  • 35
  • 57
  • 1
    I'm an Oracle beginner. Can a q literal be used instead? How would you write it? – jarlh Jun 14 '22 at 15:43
  • do what littlefoot said, add 'set scan off' in front of your INSERT, then run both together with F5 – thatjeffsmith Jun 14 '22 at 18:28
  • @jarlh, we use the q-quoting mechanism when we deal with a string that contains single quotes. If you have to enclose it into another pair of single quotes, things go *wild* so you have to "escape" them and can easily get lost. In this case, problem is another character - & - and q-quoting mechanism wouldn't help with that. – Littlefoot Jun 14 '22 at 19:56