Re: [GENERAL] copy in date string "00-00-00 00:00:00"

2012-03-15 Thread Martin Gregorie
On Wed, 2012-03-14 at 21:52 -0700, Mark Phillips wrote: > I am not familiar with sed, except for some trivial bits I nicked off > the web. Enough to know it works, and to be dangerous. Nonetheless, > using SED may be the way to go as there are two tables that contain a > bit over 3,000,000 rows eac

Re: [GENERAL] copy in date string "00-00-00 00:00:00"

2012-03-14 Thread Mark Phillips
On Mar 14, 2012, at 6:32 PM, Andy Colson wrote: > On 03/14/2012 08:16 PM, Scott Marlowe wrote: >> >> >> Can you run it through sed and replace the "-00-00 00:00:00" to >> NULL (no quotes) ? That should work. >> > > I think COPY (depending on arguments) uses \N by default. > > Another op

Re: [GENERAL] copy in date string "00-00-00 00:00:00"

2012-03-14 Thread Scott Marlowe
On Wed, Mar 14, 2012 at 7:37 PM, Andy Colson wrote: > On 03/14/2012 08:32 PM, Andy Colson wrote: >> >> On 03/14/2012 08:16 PM, Scott Marlowe wrote: >>> >>> On Wed, Mar 14, 2012 at 6:47 PM, Mark Phillips >>> wrote: I am migrating a data set from Oracle 8i to PG 9.1. The process is to >>>

Re: [GENERAL] copy in date string "00-00-00 00:00:00"

2012-03-14 Thread Andy Colson
On 03/14/2012 08:32 PM, Andy Colson wrote: On 03/14/2012 08:16 PM, Scott Marlowe wrote: On Wed, Mar 14, 2012 at 6:47 PM, Mark Phillips wrote: I am migrating a data set from Oracle 8i to PG 9.1. The process is to export data into csv files, then use the pg "copy table from file csv header" sta

Re: [GENERAL] copy in date string "00-00-00 00:00:00"

2012-03-14 Thread Andy Colson
On 03/14/2012 08:16 PM, Scott Marlowe wrote: On Wed, Mar 14, 2012 at 6:47 PM, Mark Phillips wrote: I am migrating a data set from Oracle 8i to PG 9.1. The process is to export data into csv files, then use the pg "copy table from file csv header" statement to load the tables. There are a nu

Re: [GENERAL] copy in date string "00-00-00 00:00:00"

2012-03-14 Thread Scott Marlowe
On Wed, Mar 14, 2012 at 6:47 PM, Mark Phillips wrote: > I am migrating a data set from Oracle 8i to PG 9.1. The process is to export > data into csv files, then use the pg "copy table from file csv header" > statement to load the tables. > > There are a number of date columns in the tables that