X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 732BCD1B507 for ; Mon, 15 Sep 2003 08:55:25 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 24116-08 for ; Mon, 15 Sep 2003 05:54:55 -0300 (ADT) Received: from server146.hostingrevolution.com (server146.hostingrevolution.com [64.21.143.245]) by svr1.postgresql.org (Postfix) with ESMTP id 24EE2D1B50F for ; Mon, 15 Sep 2003 05:54:53 -0300 (ADT) Received: from 221.b.002.pth.iprimus.net.au ([210.50.109.221] helo=athlon2000) by server146.hostingrevolution.com with smtp (Exim 4.22) id 19yp8H-0000Gk-Bl for pgsql-sql@postgresql.org; Mon, 15 Sep 2003 03:54:32 -0500 Message-ID: <001601c37b67$608235e0$dd6d32d2@athlon2000> From: "Richard Sydney-Smith" To: Subject: Copy Command Error Date: Mon, 15 Sep 2003 16:57:07 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01C37BAA.657B6BF0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server146.hostingrevolution.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - ibisaustralia.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=HTML_50_60 X-Spam-Level: X-Archive-Number: 200309/132 X-Sequence-Number: 15110 This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C37BAA.657B6BF0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am outputting the following rows from a SYBASE database on W2000 3 '2' 'IBISFinancials' 'A.C.N. 072 378 815' 8 'RK' 'Personal Accounts'=20 Using the command:=20 select cast(seq as integer) , id , cmpy, tr_n from fcont; output to d:\fcon= t.dat format 'ascii' delimited by '\x09' This outputs the fields tab delimited and with strings encased in inverted = commas I then use the followin POSTRESQL command: copy fcont (seq,id,cmpy,tr_n) from 'd:\\fcont.dat' The problem is that each string is imported with the inverted commas. eg field ID =3D ''RK'' instead of 'RK' Can someone please help? thanks Richard ------=_NextPart_000_000B_01C37BAA.657B6BF0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I am outputting the following rows from a = SYBASE=20 database on W2000
 
3 '2' 'IBISFinancials' 'A.C= .N. 072=20 378 815'
8 'RK' 'Personal Accounts' 
 
Using the command:
 
select cast(seq as integer) , id , cmpy, t= r_n from=20 fcont; output to d:\fcont.dat format 'ascii' delimited by '\x09'
 
This outputs the fields tab delimited and = with=20 strings encased in inverted commas
 
I then use the followin POSTRESQL=20 command:
 
copy fcont (seq,id,cmpy,tr_n) from=20 'd:\\fcont.dat'
 
The problem is that each string is importe= d with=20 the inverted commas.
 
eg field ID =3D ''RK'' instead of 'RK'
 
Can someone please help?
 
thanks
 
Richard
 
 
------=_NextPart_000_000B_01C37BAA.657B6BF0--