Re: CSV-SQL convertion

2002-08-04 Thread Milan Sorm
Wed, Oct 17, 2001 ve 02:13:43PM -0700 Scott Taylor napsal(a): # Hello, # # Does anyone have a routine to convert from a csv file to an sql database, # that works. I'm having a hard time with it. # Try dbMan package on CPAN (d /dbMan/) and internal command \csvin (uses DBD::CSV) --m.s.

Re: CSV-SQL convertion

2001-10-18 Thread Jeff Zucker
Joe Brenner wrote: > > CSV is in my experience a very annoying "standard". It > looks so simple that everyone just hacks there own > conversions, and consequently there are minor variations > floating around... e.g. I had to deal with files that had > whitespace after the comma separators, and T

Re: CSV-SQL convertion

2001-10-18 Thread Sam Roberts
Quoting Joe Brenner <[EMAIL PROTECTED]>, who wrote: > Sam Roberts <[EMAIL PROTECTED]> wrote: > > # Strip whitespace around the "," seperators. > > > > $_ =~ s/\s*,\s*/,/g; > > > > local @_ = split(/,/, $_); > > You appear to be assuming that there are no commas inside > the data itself.

Re: CSV-SQL convertion

2001-10-17 Thread Joe Brenner
Sam Roberts <[EMAIL PROTECTED]> wrote: > Quoting Scott Taylor <[EMAIL PROTECTED]>, who wrote: > > Does anyone have a routine to convert from a csv file to an sql database, > > that works. I'm having a hard time with it. > > Below is what I've done, don't know how it would work with other >

Re: CSV-SQL convertion

2001-10-17 Thread Sam Roberts
Quoting Scott Taylor <[EMAIL PROTECTED]>, who wrote: > Hello, > > Does anyone have a routine to convert from a csv file to an sql database, > that works. I'm having a hard time with it. Below is what I've done, don't know how it would work with other database types, but works well for me so fa

RE: CSV-SQL convertion

2001-10-17 Thread Dan Horne
Try DBD::CSV. You can "select" from the text file using SQL Dan -Original Message- From: Scott Taylor [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 18, 2001 10:14 AM To: [EMAIL PROTECTED] Subject: CSV-SQL convertion Hello, Does anyone have a routine to convert from a c

Re: CSV-SQL convertion

2001-10-17 Thread Brett W. McCoy
On Wed, 17 Oct 2001, Scott Taylor wrote: > Hello, > > Does anyone have a routine to convert from a csv file to an sql database, > that works. I'm having a hard time with it. Have you looked at DBD::CSV? -- Brett http://www.chapelperilous.net/ -

CSV-SQL convertion

2001-10-17 Thread Scott Taylor
Hello, Does anyone have a routine to convert from a csv file to an sql database, that works. I'm having a hard time with it. here is what I have so far: (almost works) #!/usr/bin/perl -w # use DBI; require Text::CSV_XS; my $csv = Text::CSV_XS->new; # bunch of my$ stuff and dbi:InterBase:db