Hello Elisabeth,

T E Schmitz wrote:


In this particular case, I have actually put together a sub-select, which I retrieve with BasePeer.createQueryString() and add as an AS-column in the main SELECT:


.....

------------------------

I've put this all together with Criteria except:
T.METHOD = TRANSAKTION.METHOD
T.KIND = TRANSAKTION.KIND
which links the inner to the outer SELECT.


But that complex example apart: how could you compare one column to another one in the same table?



If you check here :
http://db.apache.org/torque/criteria-howto.html
"Using the CUSTOM Comparator to check for NULL and NOT NULL" i think your case is similar.
I think you can use it like this:
criteria.add(TransaktionPeer.METHOD, (Object) "T.METHOD = TRANSAKTION.METHOD",Criteria.CUSTOM);


Best regards,
Andras.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to