|Subject||Re: Select Distinct returning multiple rows|
Found the issue
distinct and group by compare blobs differently (Don't know if this is by design or a bug)
Distinct considers all blobs to be different (I am assuming it compare blobid's) while group by appears to compare contents.
casting the blob to a varchar eliminated the issues.
Sent: December 11, 2017 2:37:39 PM
Subject: [firebird-support] Select Distinct returning multiple rows
I have a weird problem.
An over-simplified description of the problem is as follows
select a.FOO, a.BAR from FOOBAR a
returns two rows.
select distinct a.FOO, a.BAR from FOOBAR a
returns the same two rows
select a.FOO, a.BAR, count(*) from FOOBAR a group by a.FOO, a.BAR
returns one row
select a.FOO, a.BAR, count(*) from FOOBAR a group by a.FOO, a.BAR)
select distinct b.FOO, b.BAR from MYFOOBAR b