Open Source, programming and related stuff
#!/usr/bin/pythonfn = '/home/helmi/world.csv'columns = file(fn).readline()print 'create table world (%s text);' % " text,".join(columns.split(','))print "copy world from '%s' with csv header;" % fn
python csv2psql.py | psql mydb
Helped me out, This code works great thanks. Eddie Matos
how to do it using php ?
Post a Comment
2 comments:
Helped me out, This code works great thanks.
Eddie Matos
how to do it using php ?
Post a Comment