phpbar.de logo

Mailinglisten-Archive

Re: Distinct, order by
Archiv Mailingliste mysql-de

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distinct, order by



> Select DISTINCT left(LSDAT,6) from PDATEN order by LSDAT

Besser:
Select DISTINCT left(LSDAT,6) as subname from PDATEN order by subname;
                              ^  AH!   ^                      ^ OH! ^           

vieleicht sogar ein "group by". Dann brauchst Du das distinct nicht mehr.
"Group by" muß dabei vor "order by" kommen.

http://www.mysql.com/doc/S/E/SELECT.html


Stay cool, don't close the fridge

P.Bierans

---
*** Weitere Infos zur Mailingliste und MySQL unter http://www.4t2.com/mysql 


Home | Main Index | Thread Index

php::bar PHP Wiki   -   Listenarchive