Skip site navigation (1) Skip section navigation (2)

Re: SQLite to Postgres, II

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pdxpug(at)postgresql(dot)org
Subject: Re: SQLite to Postgres, II
Date: 2011-02-17 01:49:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pdxpug
On Wed, 16 Feb 2011, Michael Ewan wrote:

> Since it already has all the INSERT statements, you only need to run it as an 
> input file:
> psql -U username -d database -f foo.sql

   I have a problem that's probably a datatype mis-match and I'm just not
seeing it. The error reported is:

[rshepard(at)salmo ~]$ psql -U rshepard -d nevada -f fillwells.sql 
psql:fillwells.sql:1: ERROR:  syntax error at or near "N"
LINE 1: ...1|25||0||-710179200000|D|N|N||H|C|32031|087|N19|19N|E20|20E|...
and it's the same for every row in the input file. That's the 16th column.
Here are the first 18 columns of the table definition:

CREATE TABLE welllog (
   sequence_no INTEGER,
   well_log INTEGER,
   app TEXT,
   notice_of_intent INTEGER,
   waiver_no TEXT,
   date_log_rcvd DATE,
   date_log_rcvd_acc TEXT,
   site_type TEXT,
   work_type TEXT,
   work_type_rmks TEXT,
   proposed_use TEXT,
   drilling_method TEXT,
   sc TEXT,
   ha TEXT,
   twn TEXT,
   legal_twn TEXT,
   rng TEXT,
   legal_rng TEXT,

   The problem is with the 'legal_twn' column but I'm just not seeing it. I'm
sure that for a fresh pair of eyeballs it will be immediately obvious.
Please point out what I'm missing.



In response to


pdxpug by date

Next:From: wesDate: 2011-02-17 04:48:58
Subject: Re: SQLite to Postgres, II
Previous:From: Rich ShepardDate: 2011-02-17 00:50:09
Subject: Re: SQLite to Postgres, II

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group