Re: SQL Loader / Loading big text fields
Date: Thu, 18 Sep 2003 23:08:19 GMT
Message-ID: <oprvpw5zqskbqx0q_at_news.sf.sbcglobal.net>
Here is an example (working one) for you. First it is a copy of one of my download sql script, Second is the related control file to load that ascii file back into the database. Hope this proves helpful. Note the way how am I separating the fields. This is just an example and can be modified for your specs.
download file:
CLEAR BREAKS;
BREAK ON cod_number SKIP 0 DUPLICATES;
SET TERMOUT OFF;
SPOOL cod.tbl;
SET TRIMSPOOL ON;
COLUMN cod_final_damage_saying NEWLINE;
SELECT cod_number,
'&'||cod_description||'&',
'&'||cod_final_damage_saying||'&' FROM category_code ORDER BY
cod_number;
SPOOL OFF;
SET TERMOUT ON;
exit;
related load control file:
LOAD DATA
INFILE 'cod.tbl'
CONCATENATE 2
INTO TABLE category_code
FIELDS TERMINATED BY WHITESPACE OPTIONALLY ENCLOSED BY '&'
(cod_number,
cod_description,
cod_final_damage_saying char(4000))
------------------------------------------
On Mon, 08 Sep 2003 21:12:34 -0400, jbroder <member31829_at_dbforums.com>
wrote:
>
> Thanks your reply.
>
>
>
> My oracle version is:
>
> Oracle9i Enterprise Edition Release 9.2.0.2.0 - 64bit Production
>
>
>
> My table looks like this:
>
>
>
> ----------------------------------------- --------
> ----------------------------
>
> DOC_SECTION_HEADING VARCHAR2(150)
>
> DOC_ID NUMBER(11)
>
> DOC_SECTION_ID NOT NULL NUMBER(11)
>
> DOC_SECTION_TEXT VARCHAR2(4000)
>
>
>
>
>
>
>
> I am, unfortunately, still have problems.
>
>
> --
> Posted via http://dbforums.com
-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/Received on Fri Sep 19 2003 - 01:08:19 CEST
