Hi, > *run the script on a condition*
I'm sorry this feature is not available. What you could do is use "merge" instead of "insert". As for constraints, I'm afraid I don't know, as "if exists" is not supported yet for this. Regards, Thomas On Tuesday, August 4, 2015, Ivo Abeloos <[email protected]> wrote: > Hi all, > > I have the following problem: > > > 1. I first create a *memory* database from a script of SQL statements > 2. then I use the SCRIPT command to convert the database into a script > 'test/snapshot.sql' > 3. I then use the URL: > > jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;INIT=runscript from 'test/snapshot.sql' > in OpenEJB but multiple connections are setup by OpenEJB > > > Is there a way to *run the script on a condition* with using the IF > EXISTS in the script because there are also inserts, contraints available > in the script. > > The script should only be run on the first connection. > > Thanks, > > --Ivo > > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
