Hiho!
Hab da nen Kleines Problem.
Ich habe eine Tabelle, in der immer 2 bis n Elemente sind die zueinander gehören. Ich brauche jetzt ein select-statement, das mir Volgendes zurrückgeben soll:
die Tabelle sieht ähnlich aus wie das hier:
Das ganze Problem ist noch etwas komplexer^^, ich habs nen bischen vereinfacht um mein Problem zu verdeutlichen.
Ich benutze jetzt SQLite, habe vor ner Zeit nen bischen mit Access gearbeitet.
Daher kenne ich GroupBy, unter Access gibt es dann First und Last um sich das erste und letzte Element einer Gruppierung anzusehn, aber ich will ja auf mehr als das erste und das letzte Element zugreifen, also am liebsten wohl auf 2 bis n Elemente.
So waren meine Ansätze in Access...
Ich hoffe meine Problem war verständlich und, dass es eine Lösung gibt :-)
Hab da nen Kleines Problem.
Ich habe eine Tabelle, in der immer 2 bis n Elemente sind die zueinander gehören. Ich brauche jetzt ein select-statement, das mir Volgendes zurrückgeben soll:
Code:
zuordnung a b c 1 5 8 - 1 - - 1 2 4 6 - 2 - - 2 2 - - 3 2 - - -4 3 5 3 -
Code:
id zurodnung (abc) ist 1 1 5 a 2 1 8 b 3 1 1 c 4 2 4 a 5 2 6 b 6 2 2 c 7 2 3 c 8 2 -4 c 9 3 5 a ...
Das ganze Problem ist noch etwas komplexer^^, ich habs nen bischen vereinfacht um mein Problem zu verdeutlichen.
Ich benutze jetzt SQLite, habe vor ner Zeit nen bischen mit Access gearbeitet.
Daher kenne ich GroupBy, unter Access gibt es dann First und Last um sich das erste und letzte Element einer Gruppierung anzusehn, aber ich will ja auf mehr als das erste und das letzte Element zugreifen, also am liebsten wohl auf 2 bis n Elemente.
Code:
SELECT Tabelle1.ID1, Tabelle1.text, First(Tabelle1.text) AS ErsterWertvontext FROM Tabelle1 GROUP BY Tabelle1.ID1, Tabelle1.feld, Tabelle1.text HAVING (((Tabelle1.feld)=1));
Ich hoffe meine Problem war verständlich und, dass es eine Lösung gibt :-)
Comment