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 Todd Carmichael <to...@concur.com> on 2003/10/23 01:19:34 UTC

RE: [REPOST] Problems with BasePeer.createOracleLimitOffsetQuery

We have the problem identified and the solution.  Oracle inner select query
does not expose upward the specific table and name of each column out into
the named table A.  The criteria being passed into
BasePeer.createPrepareStatement contains both columns of the join as select
criterion.  Because the columns are named the same, the query fails.  We are
modifying our code to set only the parent table key as select criterion
(don't need it anyway).  

ToddC


-----Original Message-----
From: Todd Carmichael [mailto:toddc@concur.com] 
Sent: Wednesday, October 22, 2003 8:42 AM
To: 'torque-dev@db.apache.org'
Subject: [REPOST] Problems with createOracleLimitOffsetQuery


I have received email from others stating that they are experiencing the
same problem.  Under what conditions/queries does this method function
properly?

ToddC


-----Original Message-----
From: Todd Carmichael [mailto:toddc@concur.com] 
Sent: Tuesday, October 21, 2003 9:45 PM
To: 'torque-user@db.apache.org'
Subject: Problems with createOracleLimitOffsetQuery


Has anyone had problems with this method in torque 3.1 using Oracle 9.2?
This method is generating incorrect sql (does not get past sql compiler) for
us.  

Here is the query that this method generated and is causing an ambigous
column error:

SELECT B.* FROM ( SELECT A.*, rownum AS TORQUE$ROWNUM FROM 
( SELECT CT_LEDGER.LEDGER_KEY, CT_LEDGER.AC_HIER_KEY,
CT_LEDGER.REP_HIER_KEY, CT_LEDGER.LEDGER_CODE, CT_LEDGER_LANG.LEDGER_KEY,
CT_LEDGER_LANG.LANG_CODE, CT_LEDGER_LANG.IS_LOCALIZED, CT_LEDGER_LANG.NAME 
  		 FROM CT_LEDGER, CT_LEDGER_LANG WHERE
CT_LEDGER_LANG.LANG_CODE= 'en'  AND
CT_LEDGER.LEDGER_KEY=CT_LEDGER_LANG.LEDGER_KEY ) A
		   ) B WHERE  B.TORQUE$ROWNUM <= 500;

Any help would be appreciated.

Thanks
ToddC


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-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