Executed in an SQL window on Oracle
create type studentCourses as object (course number);
create type studentCoursesType as table of studentCourses;
create type studentCoursesObject as object (student
studentCoursesType);
create type studentCoursesTable as table of
studentCoursesObject;
<cfquery name="test" datasource="#dataSource#">
select office_committee,
studentCoursesObject(cast(multiset((select course
from students_courses
where course in ('111', '222', '333')))
as studentCoursesType)) replacement
from office_committee
</cfquery>
I receive this message:
[Macromedia][Oracle JDBC Driver][Oracle]ORA-00932:
inconsistent datatypes: expected NUMBER got
AS_ELECTIONS.STUDENTCOURSESOBJECT Error Executing Database Query.
The query executes just fine within the schema so it's not
the query. I take it Cold Fusion can't handle SQL collection types
or the driver can't handle SQL collection types?
The output should be:
President, (111, 222, 333)
Vice President, (111, 222, 333)
Chair, (111, 222, 333)
.
.so on
Work around?