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 -> Re: SQL*LDR and EXP, IMP(Urgent)

Re: SQL*LDR and EXP, IMP(Urgent)

From: <ibm_97_at_yahoo.com>
Date: Wed, 15 Dec 1999 16:24:39 GMT
Message-ID: <838fc1$6mq$1@nnrp1.deja.com>


Thanks. But one more question:

Oracle 8i for Solaris.

Table A has a NOT NULL column, and its value is white space.

After I used the the following statement to create a flat file:

set.....
spool flatfile
select col_1||'ctrl-f'||ctrl_2||'ctrl-f'||col_3 from tableA;
spool off

When I use SQLLDR to load data(for testing and appending data), it complains that violate the NOT NULL constraint. What's wrong? SQLLDR get confused by white space and NULL, how to fix it? I have no idea at all.

Thanks a lot!!!

In article <38564F55.331F_at_yahoo.com>,
  connor_mcdonald_at_yahoo.com wrote:
> Sybrand Bakker wrote:
> >
> > http://technet.oracle.com has ALL manuals onlin. You need to
subscribe, but
> > that's free and instantaneous.
> > For the rest
> > 1 yes, set linesize whatever
> > 2 you need to use the append clause instead of replace or truncate
or insert
> > Constraints will be checked of course
> > 3 Just import with ignore=y. Constraints will be checked. You will
soon
> > regret it. All violating records are dumped to output, 1 column per
line.
> >
> > Hth,
> >
> > --
> > Sybrand Bakker, Oracle DBA
> > NJN <ibm_97_at_yahoo.com> wrote in message
news:38569AE6.5A5BC97F_at_yahoo.com...
> > > Oracle 8i for Solaris.
> > >
> > > Use the following statement to generate a flat file: (use CTRL-F
as
> > > delimiter)
> > >
> > > set termout off
> > > set feedback off
> > > set verify off
> > > set heading off
> > >
> > > spool flatfile
> > > select col_1||'ctrl-F'||col_2||'ctrl-F'||.......||col_end
> > > from table;
> > > spool off
> > >
> > > My questions:
> > >
> > > 1. This table has lots of columns, several are defined as varchar2
(256).
> > > Each row of table retrived in the flat file is divided into
several
> > > lines. How to fix this? set linesize...(?) Where can I find the
help
> > > info about sqlldr and sqlldr control file? I don't have the
manual right
> > > now.
> > >
> > > Anyway, does my way for generating flat file and loading into
table
> > > work?
> > >
> > > 2. Can SQLLDR be used to load data into existing table which
already has
> > > some data? If yes, how? I don't have to manual in my hand.
> > >
> > > 3. Can IMPORT be used to load into existing table which already
has some
> > > data? If yes, how?
> > >
> > > Thanks for help!!!! Pl,ease also email me a copy! Urgent without
manual!
> > >
>
> and set trimspool on which will allow you to set a massive line size
and
> not worry about trailing spaces in your spool file.
>
> HTH
> --
> ===========================================
> Connor McDonald
> "These views mine, no-one elses etc etc"
> connor_mcdonald_at_yahoo.com
>
> "Some days you're the pigeon, and some days you're the statue."
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Dec 15 1999 - 10:24:39 CST

Original text of this message

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