Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Inserting Large Amount of Data into LONG
.. and you should use CLOB (if string) or BLOB (if binary) instead of LONG
if your database realease has.
Juan Carlos Reyes Pacheco
OCP
-------Original Message-------
From: oracle-l_at_freelists.org
Date: 08/04/04 03:42:16
To: oracle-l_at_freelists.org
Subject: Re: Inserting Large Amount of Data into LONG
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
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- 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 - 15:04:29 CDT
![]() |
![]() |