Re: escape colon char

  • From: Andy Wattenhofer <watt0012@xxxxxxx>
  • To: stellr@xxxxxx
  • Date: Thu, 18 Aug 2016 13:25:51 -0500

It looks to me like you need to escape the second, third, and fourth single
quote (') characters. The way you have the text written, the :mi would be
interpreted as a bind variable. So put two ' characters to escape them
where they are part of the string:

time_text varchar2(100) := 'begin dbms_job.next_date(63,to_date(''18/08/2016
12:10'',''dd/mm/yyyy hh24:mi'')); end;  ';


Andy

On Thu, Aug 18, 2016 at 11:33 AM, Ray Stell <stellr@xxxxxx> wrote:

I want to change another users job run time with
sys.dbms_sys_sql.parse_as_user. When I set a timestamp var with hh24:mi
for a specific next_date run time the interpreter uses mi as a bind var.
How can I escape this timestamp?

time_text varchar2(100) := 'begin dbms_job.next_date(63,to_date('18/08/2016
12:10','dd/mm/yyyy hh24:mi')); end;  ';

Calling sys.dbms_sys_sql.parse_as_user I get: SP2-0552: Bind variable "MI"
not declared.

That's all folks!

--
//www.freelists.org/webpage/oracle-l



Other related posts: