Re: [SQL] No sort with except

2012-03-01 Thread reto . buchli
[email protected] schrieb am 01.03.2012 09:16:53: > From: Frank Lanitz > To: [email protected], > Date: 01.03.2012 09:16 > Subject: Re: [SQL] No sort with except > Sent by: [email protected] > > Am 01.03.2012 09:13, schrieb [email protected]: > > Dear all, > >

[SQL] No sort with except

2012-03-01 Thread reto . buchli
Dear all, When I run the following SQL with PostgreSQL 9.1: -- SELECT DISTINCT ON (pernr) pernr, vorna, nachn, eindt, ausdt, updat, status FROM person WHERE eindt <= TO_CHAR(CURRENT_DATE,'MMDD') AND ausdt >= TO_CHAR(CURRENT_DATE,'MMDD') ORDER BY pernr, eindt DESC; -- it wo