Re: Copying null values
От | Christof Glaser |
---|---|
Тема | Re: Copying null values |
Дата | |
Msg-id | 01041016210700.00767@pinguin обсуждение исходный текст |
Ответ на | Copying null values (Amanda Riera <amanda@labtie.mmt.upc.es>) |
Список | pgsql-sql |
On Tuesday, 10. April 2001 14:17, Amanda Riera wrote: > I would like empty fields from a file being recognised as NULL > values. It doesn't seem to work when a COPY is done, but when I make > an INSERT without > specifying the value, this is recognised as a NULL > > The file I want to copy is: > > ,0,Unknown,01/01/3000,01/01/3000,01/01/3000,0, > 1,3,,01/01/3000,01/01/3000,01/01/3000,0, > 2,,Unknown,01/01/3000,01/01/3000,01/01/3000,0, > > What I am doing is: > > COPY bill FROM '/home/amanda/informatica/provas/bills-copy.dat' USING > DELIMITERS ',' WITH NULL AS '\,'; Just try COPY ... WITH NULL AS ''; HTH, Christof -- gl.aser . software engineering . internet service http://gl.aser.de/ . Planckstraße 7 . D-39104 Magdeburg Tel. +49.391.7 44 77 10 . Fax +49.391.7 44 77 13 . Mobil 0177.77 92 84 3
В списке pgsql-sql по дате отправления: