18 Aug 2006 21:49
Using 'DISTINCT ON' clause in select statement
Paul Steinkamp <steinkam <at> apple.com>
2006-08-18 19:49:19 GMT
2006-08-18 19:49:19 GMT
Greetings, I'm using postgres as my DB which will accept the clause: SELECT DISTINCT ON ( field1, ..., fieldn) fieldA, fieldB,... FROM .... Note there is no comma after the closing ')' after the 'DISTINCT ON' clause. My various attempts either end up not getting it included at all or included as a function (and therefore separated from the selection field lists by a comma). Is there a way within the class (short of raw SQL) to perform this kind of select? Thanks, Paul
RSS Feed