Einzelnen Beitrag anzeigen

alzaimar
(Moderator)

Registriert seit: 6. Mai 2005
Ort: Berlin
4.956 Beiträge
 
Delphi 2007 Enterprise
 
#7

Re: Eine etwas komplexere Sortierung

  Alt 17. Mai 2006, 12:21
Aha, pro Eintrag in Feld1...Feld5 eine Zeile im Resultat.
SQL-Code:
select * from tabelle where feld1 is not null
union
select * from tabelle where feld2 is not null
union
select * from tabelle where feld3 is not null
union
select * from tabelle where feld4 is not null
union
select * from tabelle where feld5 is not null
order by coalesce (feld1,feld2,feld3,feld4,feld5)
"Wenn ist das Nunstruck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"
(Monty Python "Joke Warefare")
  Mit Zitat antworten Zitat