Re: [GENERAL] union query returning duplicates

2004-10-20 Thread Alvaro Herrera Munoz
On Wed, Oct 20, 2004 at 01:54:04PM +0200, Sim Zacks wrote: > It is very weird, I just tried both a group by and distinct and both > of them still return the duplicates. > > I also tried a very simple union which didn't return any duplicates, > both of these said, it is obviously not a problem with

Re: [GENERAL] union query returning duplicates

2004-10-20 Thread Sim Zacks
double precision is inexact and therefore any query returning a field of that type cannot be in a group by/distinct... I switched it to type ::numeric(10,4) and it worked fine. It was the system that automatically did the conversion for me, so I will have to figure out why and keep that in mind f

Re: [GENERAL] union query returning duplicates

2004-10-20 Thread Sim Zacks
It is very weird, I just tried both a group by and distinct and both of them still return the duplicates. I also tried a very simple union which didn't return any duplicates, both of these said, it is obviously not a problem with union. I just tried the query without the case statement that does

[GENERAL] union query returning duplicates

2004-10-20 Thread Sim Zacks
I am using 8.0 beta 1 on an RH 8 Linux server. I have a union query that I am converting from access (where it worked) and it is returning duplicates. The only difference between the two rows is the Row field, which is returned automatically. and an example of a row that it has returned duplicate