Problem with distinct selection and binary/blob values

[email protected]
Newsgroups gmane.comp.db.sapdb.general
Message-ID <[email protected]>
Hi!

I seem to experience a small problem with legacy SQL code I'm trying to use.
Synthetic stripped down test-example is as follows.

Imagine this small table:

create table test (id integer, binaryValue long byte)

You can leave it empty to test:

SELECT DISTINCT id FROM test WHERE id IS NOT NULL <works>
SELECT DISTINCT id FROM test WHERE binaryValue IS NOT NULL <doesn't work>

Any ideas around how to rewrite this to check for non null values for
the blob but still maintain the distinct id. The result code says, that this
query is not supported with the type long byte. Changing the type of
the column is an option, but are there any other suitable blob typings?
Any "split it up" suggestions?

Cheers,

Martin


--
Martin Göllnitz
Technical Lecturer

fon +49.40.325587.221
fax +49.40.325587.999
[email protected]

CoreMedia AG
Ludwig-Erhard-Straße 18
D-20459 Hamburg, Germany
www.coremedia.com

CoreMedia - Smart Content Technology
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.