-3

I am trying to write a procedure that writes the following to a file.How to i handle the single and double quotes such that they are also write as is on the file and text will be an in varchar2 variable

<div class="tree">

<a id="displayText" href="javascript:toggle('toggleText');">||text||</a> <== click Here
<div onclick="javascript:toggle('toggleText');">

<div id="toggleText" style="display:none; border-width:2px; border-style:solid"><H1>||text||</H1></div>
</div>
2

1 Answer 1

0
declare
v_val varchar2(500):=q'[<div class="tree">

<a id="displayText" href="javascript:toggle('toggleText');">||text||</a> <== click Here
<div onclick="javascript:toggle('toggleText');">

<div id="toggleText" style="display:none; border-width:2px; border-style:solid"><H1>||text||</H1></div>
</div>]';
begin
dbms_output.put_line(v_val);
  end;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.