Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Error executing Database query

Explorer ,
Dec 11, 2008 Dec 11, 2008
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?
275
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 12, 2008 Dec 12, 2008
LATEST
No one uses SQL types in Cold Fusion? There has to be someone who has run across this situation before?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources