Re: [GENERAL] Stream data into Postgres via Perl

2002-10-30 Thread Medi Montaseri
Why you say using Excel is better, note how you just changed a batch program that could potentially run at 3:00 AM into an interactive operator needed task My vote is, stay with the automation, its hard at the begining but pays later... Ashish Lahori wrote: Hi, I think the best way of do

RE: [GENERAL] Stream data into Postgres via Perl

2002-10-30 Thread Ashish Lahori
Hi, I think the best way of doing the Insertion is to use the copy command of postgres. You then have to insert Then nextval manually. this can be done by replacing and '|' with ',' and save it as .CSV. Open the file in Excel and insert the intial row as the way you want, i mean the starting index

Re: [GENERAL] Stream data into Postgres via Perl

2002-10-29 Thread Garrett Bladow
# A better way would be to prepare you statement only once # $dbh->do runs a prepare everytime, so that is un-needed processing time for the DBMS $sql = "INSERT INTO cdl_16master VALUES(nextval('cdl_16_seq'),?,?,?,?,?,?,?,?,?,?)"; $sth = $dbh->prepare($sql); while () { chomp; #removes \n