Inserting HTML into Oracle DB

I want to insert HTML code in excess of 4000 characters into an Oracle CLOB field, but am experiencing errors when updating the code

Think I have two problems, the first is I think html values such as & appear to be being treated as variables when they shouldnt, the second is that the info isnt being inserted as it apparently is too big for the CLOB

Swift assistance on this one would be greatly appreciated - deadline is tomorrow
Who is Participating?
If you are going to use SQL*Plus to enter the data, try adding this to your script:

SET LONG 2000000000


Explanation... the values for LONG and LONGCHUNKSIZE determine how much data can be shown for LONG and LOB columns.
Are you using PL/SQL or SQL?

If you are using SQL, try using "SET SCAN OFF" before running your script.

As far as a CLOB not taking more than 4000 characters, it seems odd... you have a 2GB limit on CLOB's... why not provide some examples of what you are doing.
yellowhatAuthor Commented:
Hi thanks for your reply, sorry Im not sure what sql version im using other than the fact that im running the queries on Oracle! Ive always dealt with MySQL up until now and this has never been a problem.

Ive attatched some modified code with the syntax intact.

The part "'blaba & lots &&   lots of text......'" is where Im having the problems, If I enter text here that doesnt contain an & sign and the contents are short it works fine but when &'s exist thats when the problems happen, im dealing with html so I need to be able to store these basic values.

Ive been using Toad for administrating the db and running the query with the &'s brings up a variables dialogue box?

SET SCAN OFF INSERT INTO TBL_COURSEDETAIL ( A, B, C, D, E, F, G, H, I ) VALUES ( 'blaba', 'blaba', 'blaba & lots &&   lots of text......', 'blaba', 'blaba', 'blaba', 'blaba', 'blaba', 'blaba' )

Open in new window

yellowhatAuthor Commented:
just realised the code has the SET SCAN OFF text in there, I didnt mean to post this as I was trying out the suggested solution, unfortunately this didnt work
I'm pretty sure you have to have those separated new line...

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.