Volker Nebelung: GROUP BY mit String-Vergleich

Beitrag lesen

Aloha 'oe,

ich habe folgendes Problem mit einer MySQL-Abfrage:
In einer Tabelle habe ich eine Spalte 'datei' mit folgenden Beispielwerten:
123456.789
123456.888
123456.906
765432.111
765432.765
567892.098
567892.654
usw.

Nun will ich darüber eine Abfrage laufen lassen, die mir das gleiche liefert wie
SELECT * FROM tabelle GROUP BY 'den ersten sechs Buchstaben von datei'

Wie kann ich diese Anfrage formulieren? Ich bin momentan recht ansatzlos ...
Danke im Voraus.

Gruß, Volker

--
„I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies."
- Tony Hoare