Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Inserting Large Amount of Data into LONG

Re: Inserting Large Amount of Data into LONG

From: <chris_at_thedunscombes.f2s.com>
Date: Wed, 4 Aug 2004 08:45:57 +0100
Message-ID: <1091605557.41109435c287b@webmail.freedom2surf.net>


Bill,

You can use SQL Loader with the STR attribute on the INFILE line e.g.

LOAD DATA
INFILE infile.dat "STR x'120A'"
INTO TABLE mytab

This says that the end of record delimiter is hex(120a) i.e. hex(12) + newline. Tom Kyte's Expert one-on-one bo0k Chapter 9 has all the details plus some other options.

I'm sure you could also do it via scripting languages such as Perl and Python and use an appropriate database driver (standard DBD/DBI for Perl and say cx_Oracle for Python).

HTH. Chris

Quoting "Magaliff, Bill" <Bill.Magaliff_at_lendware.com>:

> Hello:
>
> I have an engineer who would like to insert roughly 11K into a LONG column
> through SQL. It's ASCII "formatted" data (with carriage returns, spaces,
> etc.) that we will receive via XML. We can massage, reformat as needed but
> it needs to go into a LONG (using CLOB not an option due to other
> application incompatibilities).
>
> Straight SQL doesn't work (length of the quoted string too long) and I tried
> creating a Stored Proc to handle it, but I get Invalid Sql Statement - due I
> think to the presence of the carriage returns, which Oracle is not
> recognizing as a continuation from the previous line.
>
> Any thoughts on how to proceed?
>
> Thanks
>
> -bill magaliff
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>

Chris Dunscombe

Christallize Ltd  



Everyone should have http://www.freedom2surf.net/

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed Aug 04 2004 - 02:41:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US