empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele (JIRA) <empire-db-...@incubator.apache.org>
Subject [jira] [Closed] (EMPIREDB-75) DBCommand should allow me to select duplicate columns
Date Mon, 04 Feb 2013 14:12:14 GMT

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

Rainer Döbele closed EMPIREDB-75.
---------------------------------


Cleanup of unclosed issues.
                
> 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
>            Assignee: Rainer Döbele
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message