You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Brendan Miller <bm...@dotster.com> on 2007/04/18 22:17:59 UTC

Criteria to insert into from select?

Here's another Criteria question.  Is it possible to express

    INSERT INTO table (...) SELECT ... FROM anotherTable WHERE...

using Criteria and doInsert()?

(I don't think so--I fully expect a "Torque is an OM mapper, and you're
not doing any mapping there" response.)

Brendan

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


Re: Criteria to insert into from select?

Posted by Luca Ciocci <l....@askweb.it>.
I don't think that:

   INSERT INTO table (...) SELECT ... FROM anotherTable WHERE...

is SQL Standard, but it  works with a lot of database: MySQL, Oracle,
Sybase, ecc.. I don't think it works in Microsoft Access.
Sometimes that kind of instruction is very useful to populate new table.

Luca.

Il giorno sab, 05/05/2007 alle 04.01 -0700, Thomas Fischer ha scritto:
> Sorry, Torque does not support this (yet? Paches appreciated). Do you know 
> whether it is standard SQL ? I know it works with mysql, but i have no 
> idea about other databases.
> 
>      Thomas
> 
> On Wed, 18 Apr 2007, Brendan Miller wrote:
> 
> >
> > Here's another Criteria question.  Is it possible to express
> >
> >    INSERT INTO table (...) SELECT ... FROM anotherTable WHERE...
> >
> > using Criteria and doInsert()?
> >
> > (I don't think so--I fully expect a "Torque is an OM mapper, and you're
> > not doing any mapping there" response.)
> >
> > Brendan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
-- 
ASK Web Division
Ing. Luca Ciocci
mailto: l.ciocci@askweb.it
Tel. +39 059 271417

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


Re: Criteria to insert into from select?

Posted by Thomas Fischer <tf...@apache.org>.
Sorry, Torque does not support this (yet? Paches appreciated). Do you know 
whether it is standard SQL ? I know it works with mysql, but i have no 
idea about other databases.

     Thomas

On Wed, 18 Apr 2007, Brendan Miller wrote:

>
> Here's another Criteria question.  Is it possible to express
>
>    INSERT INTO table (...) SELECT ... FROM anotherTable WHERE...
>
> using Criteria and doInsert()?
>
> (I don't think so--I fully expect a "Torque is an OM mapper, and you're
> not doing any mapping there" response.)
>
> Brendan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

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