X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AE1EE52849 for ; Mon, 20 Jun 2005 13:26:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 85464-01 for ; Mon, 20 Jun 2005 16:26:24 +0000 (GMT) Received: from hub.org (hub.org [200.46.204.220]) by svr1.postgresql.org (Postfix) with ESMTP id D7DF052818 for ; Mon, 20 Jun 2005 13:26:24 -0300 (ADT) Received: from localhost (unknown [200.46.204.144]) by hub.org (Postfix) with ESMTP id 641BC64B881 for ; Mon, 20 Jun 2005 13:26:25 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83723-08 for ; Mon, 20 Jun 2005 16:26:15 +0000 (GMT) Received: from ganymede.hub.org (blk-224-176-51.eastlink.ca [24.224.176.51]) by hub.org (Postfix) with ESMTP id C03C264B971 for ; Mon, 20 Jun 2005 13:26:11 -0300 (ADT) Received: by ganymede.hub.org (Postfix, from userid 1000) id 39CCC3449A; Mon, 20 Jun 2005 13:26:11 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 38E9134479 for ; Mon, 20 Jun 2005 13:26:11 -0300 (ADT) X-Return-Path: X-Received: from ganymede.hub.org ([unix socket]) by ganymede.hub.org (Cyrus v2.2.12) with LMTPA; Mon, 20 Jun 2005 07:55:43 -0300 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 2F8D545DA8 for ; Mon, 20 Jun 2005 07:55:43 -0300 (ADT) X-Received: from mail.postgresql.org [200.46.204.71] by localhost with IMAP (fetchmail-6.2.5) for scrappy@localhost (single-drop); Mon, 20 Jun 2005 07:55:43 -0300 (ADT) X-Received: from svr1.postgresql.org ([unix socket]) by svr1.postgresql.org (Cyrus v2.2.12) with LMTPA; Mon, 20 Jun 2005 07:55:09 -0300 X-Sieve: CMU Sieve 2.2 X-Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 522C0528B1 for ; Mon, 20 Jun 2005 07:55:09 -0300 (ADT) X-Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07434-05 for ; Mon, 20 Jun 2005 10:54:59 +0000 (GMT) X-Received: from web61213.mail.yahoo.com (web61213.mail.yahoo.com [209.73.179.62]) by svr1.postgresql.org (Postfix) with SMTP id 8A35F528B7 for ; Mon, 20 Jun 2005 07:54:56 -0300 (ADT) X-Received: (qmail 61492 invoked by uid 60001); 20 Jun 2005 10:54:55 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.br; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=uHP2tl1WCxR53TXxu0DYpsx6sxqMAuk5F1Z8P3HGaUMA/tYbwV9ufgYwmTfoYdNsgCDDfzG8Nt1BRnnwpBATsTyL3Fc9OYpKKkH9sTXZ/sz8kc/71VP3Bd9D+rjleuzaKpA9kgqDFA7EEC8d+4EU2LYR3Szel1D43ekciMhYlSg= ; Message-ID: <20050620105455.61490.qmail@web61213.mail.yahoo.com> X-Received: from [193.136.204.219] by web61213.mail.yahoo.com via HTTP; Mon, 20 Jun 2005 07:54:55 ART Date: Mon, 20 Jun 2005 07:54:55 -0300 (ART) From: sara simoes Subject: Migrate data from Access to PostgreSQL To: pg-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-840619675-1119264895=:60489" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org ReSent-Date: Mon, 20 Jun 2005 13:26:05 -0300 (ADT) Resent-From: "Marc G. Fournier" Resent-To: pgsql-interfaces@postgresql.org ReSent-Subject: Migrate data from Access to PostgreSQL ReSent-Message-ID: <20050620132605.F90456@ganymede.hub.org> X-Virus-Scanned: by amavisd-new at hub.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.967 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, FROM_ENDS_IN_NUMS, HTML_20_30, HTML_MESSAGE X-Spam-Level: * X-Archive-Number: 200506/54 X-Sequence-Number: 5622 --0-840619675-1119264895=:60489 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, I've got an Access database and I need to migrate the data from the Access database to a Postgresql database. Up to this moment, I've done the following: - Create a table in postgresql create table clients ( name text, phone text, age integer ); - export the table client in "tab" delimited format from access with the fields in the same order as in postgresql : mary 5551212 25 peter 5551313 26 paul 5551414 30 john 5551515 27 - use "copy table from..." command copy client from 'C:/teste.txt'; Nevertheless, the data was not inserted and I received the following error message: Line with OID 0 inserted. ERROR: syntax error at or near "COPY" at character 9 What might be the problem? If export the table with comma delimited and use COPY client FROM 'C:/teste.txt' using delimiters ','; I get the following error message: Line with OID 0 inserted. ERRO R: syntax error at or near "COPY" at character 9 Note: I'm working with PgAdminIII I would appreciate your help, --------------------------------- Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora! --0-840619675-1119264895=:60489 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hello,

I've got an Access database and I need to migrate the data from the Access database to a Postgresql database.
Up to this moment, I've done the following:

- Create a table in postgresql
create table clients
(
name text,
phone text,
age integer
);

- export the table client in "tab" delimited format from access with the
fields in the same order as in postgresql :
mary 5551212 25
peter 5551313 26
paul 5551414 30
john 5551515 27

- use "copy table from..." command

copy client from 'C:/teste.txt';


Nevertheless, the data was not inserted and I received the following error message:

Line with OID 0 inserted.
ERROR: syntax error at or near "COPY" at character 9

What might be the problem? If export the table with comma delimited and use
COPY client FROM 'C:/teste.txt' using delimiters ',';

I get the following error message:

Line with OID 0 inserted.

ERRO R: syntax error at or near "COPY" at character 9

Note: I'm working with PgAdminIII  

I would appreciate your help,


Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora! --0-840619675-1119264895=:60489--