Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7F2D92E005E for ; Wed, 26 Mar 2008 13:22:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 86355-06 for ; Wed, 26 Mar 2008 13:21:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.xmtservices.net (unknown [66.224.65.210]) by postgresql.org (Postfix) with SMTP id 75F5E2E0060 for ; Wed, 26 Mar 2008 13:21:57 -0300 (ADT) Received: (qmail 2712 invoked from network); 26 Mar 2008 16:21:56 -0000 Received: from unknown (HELO vaio.xmtservices.net) (192.168.0.101) by errol.xmtservices.net with SMTP; 26 Mar 2008 16:21:56 -0000 From: Shawn To: pgsql-sql@postgresql.org Subject: Re: Export Access 97 to PostgreSQL Date: Wed, 26 Mar 2008 16:21:55 +0000 User-Agent: KMail/1.9.9 References: <002001c88f37$107363b0$3102a8c0@dream> In-Reply-To: <002001c88f37$107363b0$3102a8c0@dream> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803261621.55622.postgres@xmtservices.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/174 X-Sequence-Number: 30502 On Wednesday 26 March 2008 11:46:43 Shavonne Marietta Wijesinghe wrote: > Hello > > I have a db in MS Access 97 and now i have to import the data in > PostgreSQL. I can create the table structure in PostgreSql but in what > format can i export the table from Access so Postgresql can read it? > > Thanks > > Shavonne Hello Shavonne, I'm no expert but I have often used either the tab or comma delimited format. It requires that the fields in the PostgreSQL table are in the same order as the original and that the data types are formatted similarly, but it has worked for me. Also a sed and awk'ing of the results can clean up alot of formatting issues. example, one of my fields is in the timestamp with time zone format but MS-SQL doesn't differentiate Time Zones, at least not in the database I'm pulling from. I use this line to add the UTC to the field " sed 's/\t/ UTC\t/1'". Shawn