Re: Insert > 2499

From: joel garry <joel-garry_at_home.com>
Date: Mon, 26 Jul 2010 15:55:28 -0700 (PDT)
Message-ID: <9c4a61f3-c8ab-44e8-b349-2e225a417f1c_at_u31g2000pru.googlegroups.com>



On Jul 23, 5:34 am, Mark D Powell <Mark.Powe..._at_hp.com> wrote:
> On Jul 21, 8:02 pm, joel garry <joel-ga..._at_home.com> wrote:
>
>
>
> > On Jul 21, 2:23 pm, The Magnet <a..._at_unsu.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/ASKTOM.download_file?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
> > --
> > _at_home.com is bogus.
> > Interesting truncation in url different than meaning of post:http://blogs.oracle.com/otn/2010/06/finding_it_difficult_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 DOSstyle  ^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

--
_at_home.com is bogus.
http://blogs.sun.com/bmc/entry/good_bye_sun
Received on Mon Jul 26 2010 - 17:55:28 CDT

Original text of this message