Thread: bigger problem

bigger problem

From
"Carlos Sousa"
Date:
in postgres database i created a table with a field like

create table (...)
(...)
var text default '' not null
(...)

now i need to import the data from this table into a oracle database
i used pg_dump

I altered the field data type to

(...)
var varchar2(50) default '' not null
(...)

but when i was importing the the table into the oracle database all the rows 
with the field var='' were not inserted.
Is there a way to work this around

thanks for your time and replay





_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail



Re: bigger problem

From
"Josh Berkus"
Date:
Carlos,

> in postgres database i created a table with a field like
> 
> create table (...)
> (...)
> var text default '' not null
> (...)
> 
> now i need to import the data from this table into a oracle database
> i used pg_dump
> 
> I altered the field data type to
> 
> (...)
> var varchar2(50) default '' not null
> (...)
> 
> but when i was importing the the table into the oracle database all
> the rows with the field var='' were not inserted.
> Is there a way to work this around

This is a problem with your configuration of Oracle import.   See your
Oracle documentation; we cannot help you here.

-Josh Berkus


Re: bigger problem

From
Peter Eisentraut
Date:
Carlos Sousa writes:

> (...)
> var varchar2(50) default '' not null
> (...)
>
> but when i was importing the the table into the oracle database all the rows
> with the field var='' were not inserted.
> Is there a way to work this around

Yes, don't use Oracle.

In Oracle, '' is the same as null, so the constraint is not satisfied.

-- 
Peter Eisentraut   peter_e@gmx.net