Total Pageviews

2009/04/16

ORA-00932: inconsistent datatypes: expected - got CLOB

As I am doing data query with distinct syntax in select clause, I got this error message:
ORA-00932: inconsistent datatypes: expected - got CLOB

This error message result from Clob limitation:


  1. CLOBs don't work like strings. You can't ask for the LENGTH of a CLOB column, for example. You can work around this with PL/SQL calls but it isn't much fun.
  2. LOBs are not allowed in GROUP BY, ORDER BY, SELECT DISTINCT, aggregates and JOINS


Therefore, I re-designed my database schema. Save this CLOB column into another table.


No comments: