ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fran.c...@free.fr
Subject Re: AW: Writing subqueries
Date Fri, 29 Jan 2010 13:20:50 GMT

I was waiting for something more complex !
Thanks for your reply... and for the advice !
Best regards.


Selon Stephen Friedrich <stephen.friedrich@fortis-it.eu>:

> The statement you gave is a single statement.
> iBatis doesn't care (or know) how many subqueries it contains.
> You can simply use a single <update> tag:
>
> <update id="insertFoo">
>    INSERT into table1 (ville, nom, datn)
>    SELECT l.ville, l.nom, v.datn
>    from mtab l, dpart b, table3 v
>    where      b.nom=l.nom
>          and (b.nom,v.datn) not in (SELECT x.nom,x.datn from table1 x)
> </update>
>
> I recommend just giving ibatis a testdrive and actually playing with it a
> little.
>
> -----Urspr√ľngliche Nachricht-----
> Von: F. TRAORE [mailto:fran.cois@free.fr]
> Gesendet: Freitag, 29. Januar 2010 13:07
> An: user-java@ibatis.apache.org
> Betreff: Re: Writing subqueries
>
>
> > Thats just an update query. I'm not sure what the difficulty you have is?
> >
> Just an update query ? Two select into one insert ? Excuse me for
> disturbing you if you're an iBatis expert and please don't lose your
> time more longer...
> As I said I'm new on iBatis and just want to know how to to embed a
> statement within another.
> Thanks for any example.
>
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message