From user-return-61914-apmail-ant-user-archive=ant.apache.org@ant.apache.org Fri Aug 24 13:41:51 2007 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 58013 invoked from network); 24 Aug 2007 13:41:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Aug 2007 13:41:49 -0000 Received: (qmail 94549 invoked by uid 500); 24 Aug 2007 13:41:42 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 94504 invoked by uid 500); 24 Aug 2007 13:41:42 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 94493 invoked by uid 99); 24 Aug 2007 13:41:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 06:41:42 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.252.149.38] (HELO smtpout02s1.x-echo.com) (193.252.149.38) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 13:42:20 +0000 Message-ID: <46CEDFFC.2020200@echo.fr> Date: Fri, 24 Aug 2007 15:41:16 +0200 From: =?UTF-8?B?S3J6eXN6dG9mIEt1Y3liYcWCYQ==?= Organization: Orange User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Ant Users List Subject: Re: sql ant task References: <283239.84360.qm@web54506.mail.re2.yahoo.com> <46CED166.4060408@echo.fr> <12312062.post@talk.nabble.com> In-Reply-To: <12312062.post@talk.nabble.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-AV-Checked: ClamAV using ClamSMTP X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-105.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, USER_IN_WHITELIST autolearn=ham version=3.0.3 I guess I can give You a postgreSQL example, if that suits You. Under unix/linux pgsql comes with a command line tool which you can easily use. Here's the sample part of antfile - not tested, so no guarantees, but I suppose it could look more or less like this: Dig the ant docs a little to find out more. If I remember pgsql well, this should probably work fine, if you'd have it accessible on the system path. Best regards, Krzysztof miro wrote: > Thank you very much for your reply can you send me a simple example of using > exec task to execute a sql file ? > Thanks > Miro > > > Krzysztof KucybaƂa wrote: >> I suppose the easies, though maybe not the smartest way to do it, would >> be to use exec task. Of course that is only useful if you have a command >> line interface for the db that You're trying to use. You could put this >> in some *.sql file and have it exec-uted from ant. Does that help? >> >> Best regards, >> Krzysztof >> >> temp temp wrote: >>> I trying to execute small script using ant , here is the script >>> SET NEWPAGE 0 >>> SET SPACE 0 >>> SET LINESIZE 80 >>> SET PAGESIZE 0 >>> SET ECHO OFF >>> SET FEEDBACK OFF >>> SET HEADING OFF >>> SET MARKUP HTML OFF >>> SET ESCAPE \ >>> SPOOL DELETEME.SQL >>> select 'drop table ', table_name, 'cascade constraints \;' from >>> user_tables >>> >>> how to run this script using ant sql task >>> Thanks >>> Miro >>> >>> >>> --------------------------------- >>> Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user >>> panel and lay it on us. >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org