Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
We would like to build multisets of records, for instance all of the employees in a department:
SELECT deptno, COLLECT(ROW(ename, salary)) AS emps FROM emp GROUP BY deptno
Standard SQL only allows ROW inside a table constructor (i.e. a VALUES clause). A workaround is to create a user-defined type (CREATE TYPE; see http://www.oracle-developer.net/display.php?id=306) but it would be preferable to be able to create rows of anonymous type, so that the above SELECT statement just works.
Attachments
Issue Links
- relates to
-
CALCITE-855 Allow UNNEST to have multiple arguments
- Closed