Re: SQLLDR and existing records/Unique constraint which allow nulls?

From: Major <lievonen_at_jyu.fi.HALOOOOOOOO>
Date: Wed, 29 Aug 2001 10:16:52 GMT
Message-ID: <oi3j7.163$3h3.7489_at_read2.inet.fi>


> > I have table which have primary key (sequence).
> >
> > I have one varchar2 field in source file and table,
> > whose should be "unique".
> > So when I uploadin to database, I should check
> > that is this value in the table and if not, load it and
> > if it is in table, skip record.
> > How I can do this?
>
> Do nothing, if record violate unique constraint rule then sql*loader
doesn't
> load it and will put in into *.bad file.

Yes, I know.

> > I think so that I cannot define unique constraint to table because
> > this field can have null -value (source files havenīt null values).
> > Is this true that unique constraint doen't allow null values?
>
> Unique constraint allows nulls, only if column isn't defined as NOT NULL.
> Unique constraint + not null constraint = PRIMARY KEY constraint :)

Thanks. Our DB guys said that unique not allow nulls, but he didn't know this... Received on Wed Aug 29 2001 - 12:16:52 CEST

Original text of this message