• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ant targets use to execute sql queries

 
avneet kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"NOT EXISTS" is the operator you have to use it in where clause to check for duplicates.
 
avneet kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic