MySQL Forums
Forum List  »  German

Re: Datenimport aus anderer Datenbank
Posted by: Mario Rosenbohm
Date: November 10, 2016 04:00AM

Hallo,

... habs Problem gefunden ...

MySql setzt die leeren Felder nicht automatisch durch NULL.

dies wird importiert
--------------------------------------------------------------------------------
18;2014-01-23 12:00:00,00;S;Stunden;NULL;20140123_S_TU;3;10;NULL;NULL;NULL;NULL;NULL;6
19;2012-12-19 12:00:00,00;F;HZ Anschluss 21-06 Q17;NULL;20121219_F_TU;3;12;15;NULL;NULL;NULL;NULL;6
20;2014-01-22 12:00:00,00;F;21-06 E-14;NULL;20140122_F_TU;3;15;10;NULL;NULL;NULL;NULL;6
21;2014-01-22 12:00:00,00;F;21-06 E20-01;NULL;20140122_F_TU_1;3;15;10;NULL;NULL;NULL;NULL;6
22;2014-01-27 12:15:31,31;F;23. FS;ZB195/1;20140127_F_TU;3;14;15;11;NULL;NULL;NULL;6
23;2014-01-27 12:23:53,53;F;21-06 W-04;ZB194/4;20140127_F_TU_1;3;14;15;11;NULL;NULL;NULL;6
--------------------------------------------------------------------------------
Import per Query in der Workbench
-------------------------------------------------------------------------------
SET foreign_key_checks = 0;
LOAD DATA LOCAL INFILE 'D:\messung_NULL.csv'
INTO TABLE measureorganizer.messung
FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY ';'
LINES TERMINATED BY '\n'
(id,datum,schicht,titel,beschreibung,targetfolder,truppfuehrer,messer1,messer2,messer3,messer4,messer5,messer6,instrument);
SET foreign_key_checks = 1;
--------------------------------------------------------------------------------

Options: ReplyQuote


Subject
Views
Written By
Posted
4965
November 09, 2016 01:36AM
Re: Datenimport aus anderer Datenbank
619
November 10, 2016 04:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.