Skip to main content
Inspiring
December 11, 2008
Question

Error executing Database query

  • December 11, 2008
  • 1 reply
  • 272 views
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?
    This topic has been closed for replies.

    1 reply

    NettlesDAuthor
    Inspiring
    December 12, 2008
    No one uses SQL types in Cold Fusion? There has to be someone who has run across this situation before?