aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes ant targets use to execute sql queries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ant targets use to execute sql queries" Watch "ant targets use to execute sql queries" New topic
Author

ant targets use to execute sql queries

avneet kumar
Greenhorn

Joined: Jun 01, 2011
Posts: 7
Hi,

I am using ant's sql task to automate the sql query execution.SQL query are executing successfully,but the thing i want is if a particular query is executed once,it should not
execute again.

Currently the problem I am facing is below :

I have a insert query from which i am inserting a record in a table.If i execute that query again it will again populate the duplicate data which should not ideally happen

Is there a way by which i can solve this issue....Please guide.
Harsha Gedala
Ranch Hand

Joined: Jun 04, 2008
Posts: 41

"NOT EXISTS" is the operator you have to use it in where clause to check for duplicates.
avneet kumar
Greenhorn

Joined: Jun 01, 2011
Posts: 7
Thanks Harsha for reply...
But i don't want change in the sql queries.

I am implementing automatic execution of the all the sql queries in a sql file by ant.
The thing which i want is whenever ant started executing the sql queries,it should not execute anything which is duplicate.

Hope i clear my case here


Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ant targets use to execute sql queries