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.
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
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.
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
>
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
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
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/
-
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