You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Colin Chalmers <co...@maxware.nl> on 2002/09/01 16:35:48 UTC

How to compare two columns in one/diffrent tables

Hi all,

Below is a copy of a mail I sent to the Torque list a couple of days ago,
but someone on this list may also have ideas???

I would like to extend the question to:

Is it possible to compare two columns in the same table and in seperate
tables. (I guess the SQL would be similiar) whithout knowing their values
beforehand.

ie

All records from table1 where column A > column B.

Similiarly

All records from table 1 where table1.columnA > table2.columnB

/Colin



> Hi guys,
>
> I'm trying to perform a query on a specific table for a situation where
> column1=column2, what would be the best/easiest way to do this?
>
> The following code appears to work, but is this the correct way to go
about
> it?
> We're using Torque-3-b4
>
> <snip>
> Criteria lCrit = new Criteria();
> lCrit.addJoin(FooPeer.COLUM1, FooPeer.COLUMN2);
> List lList = FooPeer.doSelect(lCrit);
> </snip>
>
> Colin Chalmers
> Maxware Benelux
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


AW: torque error when compiling webapp

Posted by Marc Lustig <ma...@marclustig.com>.
I simply removed xercesImpl.jar from ant\lib and it worked!
This is an ant 1.5 edition.

Thanks!
Marc

> -----Ursprungliche Nachricht-----
> Von: Stephen Haberman [mailto:stephenh@chase3000.com]
> Gesendet: Sonntag, 1. September 2002 21:29
> An: 'Turbine Users List'
> Betreff: RE: torque error when compiling webapp
> 
> 
> This is in the archives a lot. Best fixes are to remove ant's xerces
> from it's lib dir or downgrade to ant 1.3 if I remember correctly.
> 
> Let us know which one it is so that future users can find the answer
> when they search the archives before posting problems. ;-)
> 
> (Though now that I look closely, your stack trace looks slightly
> different, so if you have tried common solutions from the archives and
> just didn't mention it, well, ...good luck, as these VerifyErrors are a
> bit like DLL hell.)
> 
> - Stephen
> 
> > -----Original Message-----
> > From: Marc Lustig [mailto:mail@marclustig.com]
> > Sent: Sunday, September 01, 2002 1:12 PM
> > To: Turbine Users List
> > Subject: torque error when compiling webapp
> > 
> > Hi,
> > 
> > when I do an
> > 
> > F:\tdk\webapps\audiotex\WEB-INF\build>ant init
> > 
> > I get the following error:
> > 
> >      [echo] +------------------------------------------+
> >      [echo] |                                          |
> >      [echo] | Generating SQL for Turbine base system!  |
> >      [echo] |                                          |
> >      [echo] +------------------------------------------+
> > [torque-sql]
> F:\tdk\webapps\audiotex\WEB-INF\src\sql\turbine-schema.sql
> > 
> > BUILD FAILED
> > java.lang.VerifyError: (class:
> > org/apache/turbine/torque/engine/database/transform/XmlToAppData
> > hod: parseFile signature:
> > (Ljava/lang/String;)Lorg/apache/turbine/torque/engine/database/model/
> > ta;) Incompatible object argument for function call
> >         at
> >
> org.apache.turbine.torque.TorqueSQLTask.initControlContext(TorqueSQLTask
> jav
> > a:153)
> > 
> > 
> > Is this a bug in Torque?
> > Or is this due to my DB-Driver?
> > I am using MySQL and the new JConnector-Driver which supports JDBC
> 3.0.
> > 
> > Thanks!
> > Marc
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: torque error when compiling webapp

Posted by Stephen Haberman <st...@chase3000.com>.
This is in the archives a lot. Best fixes are to remove ant's xerces
from it's lib dir or downgrade to ant 1.3 if I remember correctly.

Let us know which one it is so that future users can find the answer
when they search the archives before posting problems. ;-)

(Though now that I look closely, your stack trace looks slightly
different, so if you have tried common solutions from the archives and
just didn't mention it, well, ...good luck, as these VerifyErrors are a
bit like DLL hell.)

- Stephen

> -----Original Message-----
> From: Marc Lustig [mailto:mail@marclustig.com]
> Sent: Sunday, September 01, 2002 1:12 PM
> To: Turbine Users List
> Subject: torque error when compiling webapp
> 
> Hi,
> 
> when I do an
> 
> F:\tdk\webapps\audiotex\WEB-INF\build>ant init
> 
> I get the following error:
> 
>      [echo] +------------------------------------------+
>      [echo] |                                          |
>      [echo] | Generating SQL for Turbine base system!  |
>      [echo] |                                          |
>      [echo] +------------------------------------------+
> [torque-sql]
F:\tdk\webapps\audiotex\WEB-INF\src\sql\turbine-schema.sql
> 
> BUILD FAILED
> java.lang.VerifyError: (class:
> org/apache/turbine/torque/engine/database/transform/XmlToAppData
> hod: parseFile signature:
> (Ljava/lang/String;)Lorg/apache/turbine/torque/engine/database/model/
> ta;) Incompatible object argument for function call
>         at
>
org.apache.turbine.torque.TorqueSQLTask.initControlContext(TorqueSQLTask
jav
> a:153)
> 
> 
> Is this a bug in Torque?
> Or is this due to my DB-Driver?
> I am using MySQL and the new JConnector-Driver which supports JDBC
3.0.
> 
> Thanks!
> Marc
> 
> 
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


torque error when compiling webapp

Posted by Marc Lustig <ma...@marclustig.com>.
Hi,

when I do an

F:\tdk\webapps\audiotex\WEB-INF\build>ant init

I get the following error:

     [echo] +------------------------------------------+
     [echo] |                                          |
     [echo] | Generating SQL for Turbine base system!  |
     [echo] |                                          |
     [echo] +------------------------------------------+
[torque-sql] F:\tdk\webapps\audiotex\WEB-INF\src\sql\turbine-schema.sql

BUILD FAILED
java.lang.VerifyError: (class:
org/apache/turbine/torque/engine/database/transform/XmlToAppData
hod: parseFile signature:
(Ljava/lang/String;)Lorg/apache/turbine/torque/engine/database/model/
ta;) Incompatible object argument for function call
        at
org.apache.turbine.torque.TorqueSQLTask.initControlContext(TorqueSQLTask.jav
a:153)


Is this a bug in Torque?
Or is this due to my DB-Driver?
I am using MySQL and the new JConnector-Driver which supports JDBC 3.0.

Thanks!
Marc


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>