[EP-tech] Oracle issue with order tables

Robert Berry robert.berry at liverpool.ac.uk
Fri Aug 17 15:34:17 BST 2012


Hi,

I've found another issue with the Oracle DB layer in the latest
release. Whenever ordering using the tables suffixed '__ORDERVALUES_EN'
an error such as the following occurs:

DBD::Oracle::db prepare failed: ORA-00932: inconsistent datatypes:
expected - got CLOB (DBD ERROR: error possibly near <*> indicator at
char 316 in 'SELECT "SUBJECT"."SUBJECTID" FROM "SUBJECT" LEFT JOIN
"SUBJECT__ORDERVALUES_EN" ON
"SUBJECT"."SUBJECTID"="SUBJECT__ORDERVALUES_EN"."SUBJECTID",
"SUBJECT_PARENTS" "SUBJECT_PARENTS" WHERE
"SUBJECT"."SUBJECTID"="SUBJECT_PARENTS"."SUBJECTID" AND
"SUBJECT_PARENTS"."PARENTS" = 'divisions' GROUP BY
"SUBJECT"."SUBJECTID", <*>"SUBJECT__ORDERVALUES_EN"."NAME_NAME" ORDER BY
"SUBJECT__ORDERVALUES_EN"."NAME_NAME" ASC')

This is because in Oracle you are not able to order by CLOB (or other
similar 'blob'-type fields). The field needs to be either typecast to a
VARCHAR2 or the field should be initially defined as a VARCHAR2. I'm
unsure which is the correct solution, as I don't know the details of how
these tables work. In older versions of EPrints they were defined as
VARCHAR2(1000)s, which would not cause these errors.

Best wishes,
Rob


More information about the Eprints-tech mailing list