empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Reiser (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] Updated: (EMPIREDB-75) DBCommand should allow me to select duplicate columns
Date Thu, 01 Apr 2010 11:46:27 GMT

     [ https://issues.apache.org/jira/browse/EMPIREDB-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Greg Reiser updated EMPIREDB-75:
--------------------------------


Thank you for the explanation...that works for me. And thank you for such an excellent and
innovative library.

> DBCommand should allow me to select duplicate columns
> -----------------------------------------------------
>
>                 Key: EMPIREDB-75
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-75
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: empire-db-2.0.5-incubating
>         Environment: Win32, JDK1.6.0_15
>            Reporter: Greg Reiser
>
> Allowing the option to (explicitly) select a duplicate column in DBCommand would be helpful
for a UNION type of statement. Here is the scenario: I have enterprise educators that are
able to work within all colleges in a university while I have others that can only work in
specific colleges (specialized). Also, each educator can have an enterprise id and/or a facility-specific
ID. I need to be able to query the possible educators for a specific college. Here is my SQL:
> SELECT t70.EDUCATOR_CODE, t69.EDUCATOR_ID, t69.EDUCATOR_SID
> FROM EDUCATOR t69, EDUCATOR_FACILITY t70
> WHERE t69.EDUCATOR_SID=t70.EDUCATOR_SID AND t69.STATUS=1 AND t70.FACILITY_SID=355 
> UNION 
> SELECT t69.EDUCATOR_ID, t69.EDUCATOR_ID, t69.EDUCATOR_SID
> FROM EDUCATOR t69
> WHERE t69.FACILITY_MAP_CODE=1 AND t69.STATUS=1
> An overloaded select() method on DBCommand was sufficient in my dev environment:
> public void select(DBColumnExpr expr, boolean allowDuplicateColumns)
>     { // Select this column
>         if (select == null)
>             select = new ArrayList<DBColumnExpr>();
>         if (expr != null && allowDuplicateColumns ? true : (select.contains(expr)
== false))
>             select.add(expr);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message