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

Home -> Community -> Usenet -> c.d.o.misc -> Stuck with Sql Loader

Stuck with Sql Loader

From: <pankaj_wolfhunter_at_yahoo.co.in>
Date: Tue, 26 Jun 2007 01:17:12 -0700
Message-ID: <1182845832.371163.51620@n60g2000hse.googlegroups.com>


Greetings,

(1) While loading data using sql-loader I got the following error:

SQL*Loader-951: Error calling once/load initialization ORA-26052: Unsupported type 180 for SQL expression on column col3.

I looked into docs for error description:

Cause: The direct path api does not support a SQL expression on a column of that type.

Action: Make sure the types are correct.

Table1 structure is

 Name                                      Null?    Type
 ----------------------------------------- --------
----------------------------
 col1						    Date
 col2						    Date
 col3					   NOT NULL TIMESTAMP(6)

Control file is:

unrecoverable
load data
infile '/home/data.dat'
into table table1
fields terminated by '#' optionally enclosed by '"' trailing NULLCOLS
(

 col1 "to_date(:col1,'yyyymmdd')"
,col2 "to_date(:col2,'yyyymmdd')"
,col3 "to_timestamp(:col3,'YYYY-MM-DD-HH24.MI.SS.FF6')"
)

I cant quite understand the message here. Cant I use direct api option while running sql-loader in this case? What should be done if I want to include direct option?

(2) I want to truncate and load data into oracle tables keeping in
mind referential constraints.
For now I fetched tables in parent-child fashion and created control file for each.
I cant specify truncate option in control file as parents are fetched first and then child.
Even if I get all child records first for truncation, I will not be able to load data in
child tables before parent.

How should I go about it?
For now I am explicitly "deleting" all child tables and then parents before running sql-loader (But I think deleting is not the same as truncating?)

Can we do something in control file itself? or any other preferred way?

Any help would be appreciated.

DB Version:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi PL/SQL Release 10.2.0.3.0 - Production

TIA Received on Tue Jun 26 2007 - 03:17:12 CDT

Original text of this message

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