Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

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

Last updated: June 28, 2017 - 12:51 am UTC

Version: 9.2.0.6

Viewed 10K+ times! This question is

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 Tom 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


Rating

  (2 ratings)

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

Comments

thanks a bunch

Cos, July 23, 2007 - 2:21 pm UTC


"set sqlterminator OFF" is Obsolete

SAML, June 27, 2017 - 12:38 pm UTC

"set sqlterminator OFF" is Obsolete
Connor McDonald
June 28, 2017 - 12:51 am UTC