I'm trying to perform a SELECT DISTINCT query in Oracle, like this:
SELECT
MOVIES.TITLE, CERTIFICATIONS.ID, PROJECTION.DAY, TIME_SLOTS.SLOT,
PROJECTION.REMAINING_SEATS, IMAGES.IMAGE
FROM
[...]
It doesn't work because the column "IMAGES.IMAGE" is a BLOB. I would like to exclude this field from the DISTINCT (because I don't need it to be unique), and I don't know how. I also tried with a GROUP BY clause, but if I try to GROUP on all the fields except the BLOB, Oracle returns this error:
ORA-00979: not a GROUP BY expression
And if I add the field in the GROUP BY clause, then Oracle returns this:
ORA-00932: inconsistent datatypes: expected - got BLOB
What can I do?
See Question&Answers more detail:os