Received: from swan.prod.itd.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0NAoil78919 for ; Wed, 23 Jan 2002 05:50:44 -0500 (EST) (envelope-from nickf@ontko.com) Received: from 1cust174.tnt1.richmond.in.da.uu.net ([63.27.103.174] helo=nick) by swan.prod.itd.earthlink.net with smtp (Exim 3.33 #1) id 16TKzC-0004Cm-00; Wed, 23 Jan 2002 02:50:34 -0800 Reply-To: From: "Nick Fankhauser" To: "lonh SENG" , Subject: Re: Execute A String of Query Date: Wed, 23 Jan 2002 05:46:33 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Importance: Normal In-Reply-To: <014801c1a3b3$6f4c9d50$320010ac@idlonh> X-Archive-Number: 200201/147 X-Sequence-Number: 3034 Lon- > My delimiter file is as following: > >uid|username >----+--------- >2974|012801849 Assuming all of these values are integers, and the file is called /home/lon/users.txt, this should work in psql: create table user_stuff (id Int, name BigInt); copy user_stuff from '/home/lon/test.txt' using delimiters '|'; The filename must be the full unix path, and you'll nee to remove any headers or footers that don't contain data. see this chunk of the manual for more details: http://www.postgresql.org/idocs/index.php?sql-copy.html -Nick -------------------------------------------------------------------------- Nick Fankhauser nickf@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko & Co. Software Consulting Services http://www.ontko.com/