Re: Inserting Large Amount of Data into LONG

  • From: "Juan Carlos Reyes Pacheco" <jreyes@xxxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 4 Aug 2004 16:03:27 -0400

.. 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@xxxxxxxxxxxxx
Date: 08/04/04 03:42:16
To: oracle-l@xxxxxxxxxxxxx
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@xxxxxxxxxxxx>:
 
> 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@xxxxxxxxxxxxx
> put 'unsubscribe' in the subject line.
> --
> Archives are at //www.freelists.org/archives/oracle-l/
> FAQ is at //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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: