Subject Duplicates with LIST function in Fb 2.5.4?
Author Svein Erling Tysvær
Hi, I'm puzzled by two queries returning duplicate rows:

1)
SELECT LIST('Hi') FROM RDB$DATABASE
UNION
SELECT LIST('Hi') FROM RDB$DATABASE

2)
WITH TMP(DuplicateRows) AS
(SELECT LIST('Hi') FROM RDB$DATABASE
 UNION
 SELECT LIST('Hi') FROM RDB$DATABASE)
SELECT DISTINCT DuplicateRows
FROM TMP

I was certain UNION (as opposed to UNION ALL) should remove duplicates and the same with DISTINCT. To get the latter query to return one row, GROUP BY can be added, I don't know how to make the first query return only one row.

Is this a Firebird error, and if so, is it a new one or one fixed in newer versions?

Set