Received: from tidal.ipinc.com (tidal.ipinc.com [199.245.188.85]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4PI4bA22658 for ; Fri, 25 May 2001 14:04:37 -0400 (EDT) (envelope-from jliang@tidal.ipinc.com) Received: from localhost (jliang@localhost) by tidal.ipinc.com (8.9.3/8.9.3) with ESMTP id LAA66638; Fri, 25 May 2001 11:04:14 -0700 (PDT) (envelope-from jliang@tidal.ipinc.com) Date: Fri, 25 May 2001 11:04:14 -0700 (PDT) From: Jie Liang To: Milen cc: "'pgsql-sql@postgresql.org.'" Subject: Re: batch file In-Reply-To: <01C0E51F.F2E673F0.milend@ansco.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200105/278 X-Sequence-Number: 3106 Hi, I am not sure what's your question. However, you can list a bunch of SQL statements in a text file: e.g. myfile.sql which contains: select * from tablename where .... update tablename set ... where ... ..... then, you can just run it like: psql -q dbname < myfile.sql Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 jliang@ipinc.com www.stbernard.com www.ipinc.com On Fri, 25 May 2001, Milen wrote: > Hi all!, > > I want to execute several SQL statements one after another. > Does anyone know if it is possible to create something like a "batch file" > which contains all SQL commands I want. > > Best Regards: > Milen > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html >