pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: DHSC Webmaster <webmaster@dhs-club.com>
To: Peralta Miguel-MPERALT1 <Miguel.Peralta@motorola.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Bad Date field
Date: Thu, 29 Nov 2001 12:01:39 -0500
Message-ID: <3C0669F3.54DC7842@dhs-club.com> (raw)
References: <698AE46F861FD51182CB0002B328C3720243DEB1@IL75EXM05>

You could use a perl script to read your data and do a pattern match for
consistency with your date output. Or you could import the data into a
temp table which has a text field instead of date. You could query
against your temp table to find offending data. Then use SQL to insert
the data into your real table.

Peralta Miguel-MPERALT1 wrote:
> 
> Hello everyone:
> 
> Would anyone know how to find a bad date field in an external file?  I have
> an external file that I am using to populate a table using the following
> command:
> COPY release_data FROM '/home/mperalta/release_data' USING DELIMITERS '|'
> 
> When I issue this command, the response afte a while is the following:
> 
> ERROR; Bad date external representation '9'
> 
> The external file is rather large and I've tried finding this bad date
> manually with no success.  The table I'm copying into has a datestamp of
> type DATE.
> 
> Any suggestions would be greatly appreciated.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
Bill MacArthur
Webmaster
DHS Club



view thread (4+ messages)  latest in thread

Message-ID: <3C0669F3.54DC7842@dhs-club.com>
Permalink:  ../3C0669F3.54DC7842@dhs-club.com/
Also on:    postgresql.org/message-id/3C0669F3.54DC7842@dhs-club.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: webmaster@dhs-club.com, Miguel.Peralta@motorola.com
  Subject: Re: Bad Date field
  In-Reply-To: <3C0669F3.54DC7842@dhs-club.com>
  References: <698AE46F861FD51182CB0002B328C3720243DEB1@IL75EXM05> <3C0669F3.54DC7842@dhs-club.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox