• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

ant targets use to execute sql queries

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 41
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic