Nope, does not help:

Yes, my example is rather synthetic to remove all the details, but

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

does not work. Even 

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

doesn't help, where in my example leaving out the "distinct" would have
"helped".

(SELECT id FROM test WHERE binaryValue IS NOT NULL)

alone of course works...

Thanks,

Martin


-----Originalnachricht-----
Von: Georg Thome
An: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Gesendet: 20.08.03 14:03
Betreff: Re: Problem with distinct selection and binary/blob values

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