I am running a basic query that retrieves rows based on basic conditional clauses, nothing complex. This works fine:
<cfquery name="courses" datasource="banner">
SELECT *
FROM tjucatalog
WHERE (course_status = 'Active')
AND CONCAT(subject,course_no) IN (#PreserveSingleQuotes(courselist)#)
AND term IN ('Fall 2012')
AND ((end_date > #now()#) OR (course_meeting_info IS NOT NULL))
ORDER BY TYear, TSort, DayNum, start_date, time, title
</cfquery>
However, when I remove the "AND term IN" line from the query, it fails.
<cfquery name="courses" datasource="banner">
SELECT *
FROM tjucatalog
WHERE (course_status = 'Active')
AND CONCAT(subject,course_no) IN (#PreserveSingleQuotes(courselist)#)
AND ((end_date > #now()#) OR (course_meeting_info IS NOT NULL))
ORDER BY TYear, TSort, DayNum, start_date, time, title
</cfquery>
The error I get is: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "BANINST1.TJUCATALOG_PACK", line 519
Is this maybe a view that requires the field 'term' to be included, or is there something else at play here I'm entirely unaware of?
BANINST1.TJUCATALOG_PACKlooks like a package, which you can check inall_objects; and one which possibly has avarchar2column declared too small somewhere - maybe a reference totermbut not necessarily. But it isn't clear where it fits into the picture. Istjucataloga view? Are you sure the error is coming from this select and not somewhere you're using one of the returned values later?AND term in ('Fall 2012')predicate is causing a row to be excluded from the query results. When the predicate is removed and the row is passed to the package or stored procedureBANINST1.TJUCATALOG_PACKthe error you've reported occurs. FIgure out whatBANINST1.TJUCATALOG_PACKis, dive into it. and look at line 519. Share and enjoy.