Hi,

SELECT DISTINCT id FROM (SELECT id FROM test WHERE binaryValue IS NOT NULL)

should work, but an id which is supposed to be a primary key should be
distinct anyway.

Georg

[EMAIL PROTECTED] wrote:
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

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

****************May the sapdb be with you****************


This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to