Re: sql ant task

2007-09-03 Thread Steve Loughran
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, 'cas

Re: sql ant task

2007-08-27 Thread Ognjen Blagojevic
Hi Temp, :) I trying to execute small script using ant , here is the script ... select 'drop table ', table_name, 'cascade constraints \;' from user_tables Save your script to sql/SCRIPT.sql, and try something like this: --

Re: sql ant task

2007-08-24 Thread Krzysztof Kucybała
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

Re: sql ant task

2007-08-24 Thread miro
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 c

Re: sql ant task

2007-08-24 Thread Krzysztof Kucybała
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 regar