Skip to Main Content

Breadcrumb

Dev Live Dev Intro

This month we are celebrating Developers at AskTOM. We welcome Developers of all levels of experience to join us at our FREE Developer Live events coming in August. Just click on the left to register today! If you are brand new to Database Technology, then we also have got you covered. Just click on the right for your comprehensive FREE training program to kick start your Oracle Database Development journey!

Question and Answer

Tom Kyte

Thanks for the question.

Asked: July 19, 2007 - 4:21 pm UTC

Answered by: Tom Kyte - Last updated: June 28, 2017 - 12:51 am UTC

Category: Database - Version: 9.2.0.6

Viewed 1000+ times

You Asked

hi Tom,
I have a big script file that when executed gives an error:
"ORA-01756: quoted string not properly terminated"

I've reduced it to identifying as the semicolon being the problem:


update table_x
set x_sql_statement=
'DECLARE
l_status NUMBER := 0 ;
BEGIN
SELECT 1 INTO l_status
FROM dual;
END ;'
where x_code= 'XXXXX'
/
commit
/

probably has to do with setting an Escape character for the semicolon however I have not determined how...
any help is much appreciated,
thx again
Cos

and we said...

this ONLY applies in sqlplus - a simple command line environment...

ops$tkyte%ORA10GR2> set sqlterminator OFF
ops$tkyte%ORA10GR2> update table_x
  2  set x_sql_statement=
  3  'DECLARE
  4  l_status NUMBER := 0 ;
  5  BEGIN
  6  SELECT 1 INTO l_status
  7  FROM dual;
  8  END ;'
  9  where x_code= 'XXXXX'
 10  /

1 row updated.

ops$tkyte%ORA10GR2> commit
  2  /

Commit complete.

ops$tkyte%ORA10GR2> set sqlterminator ON


and you rated our response

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Review

Reviews

thanks a bunch

July 23, 2007 - 2:21 pm UTC

Reviewer: Cos from FL


"set sqlterminator OFF" is Obsolete

June 27, 2017 - 12:38 pm UTC

Reviewer: SAML

"set sqlterminator OFF" is Obsolete
Connor McDonald

Followup  

June 28, 2017 - 12:51 am UTC

in what way ?

It's still there in the docs

http://docs.oracle.com/database/122/SQPUG/SET-system-variable-summary.htm#SQPUG109