MySQL Forums
Forum List  »  Other Migration

Re: N1NF to 1NF table conversion
Posted by: Altaz Belim
Date: July 06, 2009 08:44AM

In case there are no ready relative databases conversion tools, I could convert a csv file with Python, as follows:


import csv
input = csv.reader(open('input.csv'), delimiter=";")
output = csv.writer(open('output.csv', 'w'), delimiter=";")
for row in input:
___for cell in row[1].split(","):
______output.writerow([row[0], cell])

Options: ReplyQuote


Subject
Views
Written By
Posted
5706
July 06, 2009 03:51AM
Re: N1NF to 1NF table conversion
2962
July 06, 2009 08:44AM


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.