dbTalk Databases Forums  

Insert > 2499

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Insert > 2499 in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Magnet
 
Posts: n/a

Default Insert > 2499 - 07-21-2010 , 04:23 PM






I have some insert statements with values that are > 2500 characters.
I cannot make it a .CSV because the text has commas in it. It is a
bunch of HTML. Any suggestions?

Example:

INSERT INTO MESSAGES (message_id, sec_id, variables, name, body,
created, last_changed, created_by, changed_by, status) VALUES(5, 5,
'{ADID}', 'Premium Login Default $99', '<table border="0"
cellspacing="0" cellpadding="0" width="575" align="center">\r\n
<tbody>\r\n <tr>\r\n <td style="padding-bottom: 8px;
line-height: 18px; padding-left: 8px; padding-right: 8px; font-size:
14px; padding-top: 8px">\r\n <p><style type="text/css">\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<!--\r\n.Headline {\r\nfont-
family:Helvetica, sans-serif;\r\n font-size: 26px;\r\n font-style:
normal;\r\n line-height: 32px;\r\n font-weight: bold;\r\n color:
#000000;\r\n}\r\n--></style><span
class="Headline"><script>utmx_section("BODY_HEADLI NE")</script>Get
Free Access<br />\r\n to Premium Now </span></p>\r
\n <p>Now you can unlock the Premium icon<img alt="ZP"
width="18" height="14" src="/images/premium_small.gif" />, and
discover its secrets, including the best stocks to buy and sell for
free.&nbsp; Premium lets you apply the full force of Rank earnings
information even in this trying market.</p>\r\n <p>When you
subscribe to Premium for 30 days free, you&rsquo;ll have an entire
month to:</p>\r\n <ul>\r\n
<li><strong>Buy<strong> the best stocks</strong></strong> with our
list of #1 Rank Strong Buys. Over 20 years, it&nbsp;triples the
S&amp;P 500, averaging an amazing +28% yearly gain.<br />\r
\n &nbsp;</li>\r\n <li
class="mktgcopy"><strong>Sell<strong> the worst stocks</strong></
strong> after scanning the list of #5 Rank Strong Sells.<br />\r
\n &nbsp;</li>\r\n
<li><strong>Target<strong> today''s hottest industries</strong></
strong> with daily updates of Industry Rank.<br />\r\n
&nbsp;</li>\r\n <li><strong>Be<strong> alerted</
strong></strong> to fast-breaking buy and sell opportunities.<br />\r
\n &nbsp;</li>\r\n <li><strong>Get <em>
7 Best Stocks for the Next 30 Days. </em></strong>It''s packed with
picks, facts, and stats that are expected to blast off in the days
ahead.</li>\r\n </ul>\r\n <p>This free trial
offer may be withdrawn at anytime. So please sign-up below right now.</
p>\r\n <script>utmx_section("FREE_TRIAL")</script><center>\r
\n <table border="0" cellspacing="0" cellpadding="0"
width="300">\r\n <tbody>\r\n <tr>\r
\n <td align="center"><a href="https://
www.zk.com/registration/premium/trial/?adid={ADID}"><img
border="0" hspace="5" alt="Free Trial" width="114" height="55"
src="https://woas.zk.com/adv/images/zp_freetrialBtn.gif" /></a></td>\r
\n <td align="center"><a href="https://
www.zk.com/registration/premium_more_info.php?adid={ADID}"><img
border="0" hspace="5" alt="Learn More" width="114" height="55"
src="https://woas.zk.com/adv/images/zp_learnmoreBtn.gif" /></a></td>\r
\n <!--\r\n <td
align="center"><a href="https://www.zk.com/registration/
premium_more_info.php?adid={ADID}"><img border="0" hspace="5"
alt="Learn More" width="114" height="55" src="https://woas.zk.com/adv/
images/zp_learnmoreBtn.gif" /></a></td>\r\n -->\r
\n </tr>\r\n </tbody>\r\n
</table>\r\n </center></td>\r\n </tr>\r\n </tbody>
\r\n</table>', '2005-11-21 12:17:10', '2010-03-17 14:20:34', 'joseph',
'fabre', 'ONLINE');

Reply With Quote
  #2  
Old   
joel garry
 
Posts: n/a

Default Re: Insert > 2499 - 07-21-2010 , 07:02 PM






On Jul 21, 2:23*pm, The Magnet <a... (AT) unsu (DOT) com> wrote:
Quote:
I have some insert statements with values that are > 2500 characters.
I cannot make it a .CSV because the text has commas in it. *It is a
bunch of HTML. *Any suggestions?

Example:

INSERT INTO MESSAGES (message_id, sec_id, variables, name, body,
created, last_changed, created_by, changed_by, status) VALUES(5,
....
'fabre', 'ONLINE');
http://asktom.oracle.com/pls/apex/AS...45110710909097
http://www.oracle.com/technology/sam...dLargeXML.html
http://stackoverflow.com/questions/2...-in-oracle-11g

And so on. I'm sure I've seen some other things specific to storing
html, those are just from a quick google.

jg
--
@home.com is bogus.
Interesting truncation in url different than meaning of post:
http://blogs.oracle.com/otn/2010/06/...to_keep_u.html

Reply With Quote
  #3  
Old   
Mark D Powell
 
Posts: n/a

Default Re: Insert > 2499 - 07-23-2010 , 07:34 AM



On Jul 21, 8:02*pm, joel garry <joel-ga... (AT) home (DOT) com> wrote:
Quote:
On Jul 21, 2:23*pm, The Magnet <a... (AT) unsu (DOT) com> wrote:

I have some insert statements with values that are > 2500 characters.
I cannot make it a .CSV because the text has commas in it. *It is a
bunch of HTML. *Any suggestions?

Example:

INSERT INTO MESSAGES (message_id, sec_id, variables, name, body,
created, last_changed, created_by, changed_by, status) VALUES(5,
...
'fabre', 'ONLINE');

http://asktom.oracle.com/pls/apex/AS...-unlimited-cha...

And so on. *I'm sure I've seen some other things specific to storing
html, those are just from a quick google.

jg
--
@home.com is bogus.
Interesting truncation in url different than meaning of post:http://blogs..oracle.com/otn/2010/06...to_keep_u.html
I will just add if the data has commas in it then use a different
delimiter such as the tab character or the pipe character.

HTH -- Mark D Powell --

Reply With Quote
  #4  
Old   
Tim X
 
Posts: n/a

Default Re: Insert > 2499 - 07-25-2010 , 05:54 PM



The Magnet <art (AT) unsu (DOT) com> writes:

Quote:
I have some insert statements with values that are > 2500 characters.
I cannot make it a .CSV because the text has commas in it. It is a
bunch of HTML. Any suggestions?

Why not just put quotes around the fields with commas in them?

I use external tables to load data with commas in the fields by doing
this. The fields are not as large as yours, but it should work - though
I don't know about column limitations and clobs in this context.

Tim

--
tcross (at) rapttech dot com dot au

Reply With Quote
  #5  
Old   
joel garry
 
Posts: n/a

Default Re: Insert > 2499 - 07-26-2010 , 05:55 PM



On Jul 23, 5:34*am, Mark D Powell <Mark.Powe... (AT) hp (DOT) com> wrote:
Quote:
On Jul 21, 8:02*pm, joel garry <joel-ga... (AT) home (DOT) com> wrote:



On Jul 21, 2:23*pm, The Magnet <a... (AT) unsu (DOT) com> wrote:

I have some insert statements with values that are > 2500 characters.
I cannot make it a .CSV because the text has commas in it. *It is a
bunch of HTML. *Any suggestions?

Example:

INSERT INTO MESSAGES (message_id, sec_id, variables, name, body,
created, last_changed, created_by, changed_by, status) VALUES(5,
...
'fabre', 'ONLINE');

http://asktom.oracle.com/pls/apex/AS...p_file=6551245.......

And so on. *I'm sure I've seen some other things specific to storing
html, those are just from a quick google.

jg
--
@home.com is bogus.
Interesting truncation in url different than meaning of post:http://blogs.oracle.com/otn/2010/06/...to_keep_u.html

I will just add if the data has commas in it then use a different
delimiter such as the tab character or the pipe character.

HTH -- Mark D Powell --
That just pushes the problem along to "how do you know whatever
character you pick won't eventually be in your data?" Not long ago I
broke an EDI program. A downstream processor complained about DOS-
style ^Z at the end of a file, so my boss told me to take it out. So
I added a line at the end of the program logic to use the unix command
to remove that line. This vendor-specific program source can be
accessed from unix, or from the application thin client. I habitually
work on the server. My boss decided to make some minor change to the
program, accessing it through the app. The app sucks it down to his
favorite local PC editor. Which sees the ^Z and says "oh, that's the
end of the program source file." But of course, there is no evidence
of this if you don't look past the line. Until all of a sudden your
EDI doesn't work and you notice a truncated source file. The fix is
simple, but the possibilities before you figure out what is going on
can be hair-eliminating.

I've seen untold variants of this with data going into and out of
databases. The "just put quotes around it" has it's own fails,
depending on what you are doing. The example HTML had urls - are
those immune from quotes and commas? (Sorry Tim, I imagine your
reader choked on the example in the OP.)

jg
--
@home.com is bogus.
http://blogs.sun.com/bmc/entry/good_bye_sun

Reply With Quote
  #6  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: Insert > 2499 - 07-28-2010 , 07:02 AM



On 07/21/2010 11:23 PM, The Magnet wrote:
Quote:
I have some insert statements with values that are> 2500 characters.
So what? If your column is a varchar2, it should be able to
hold 4000 characters, provided you use a single-byte character
set. A varchar2 may contain up to 4000 byte.

I see no error.

I see markup and data combined. Bad idea. Suggest to keep
data separated from markup.

--

Regards,

Frank van Bortel

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.