cant see that from your question "antal poster"! I think you should re-define your question so we know EXACTLY what it is you wnatand maybe with an example or two!
SELECT dato, Hour([felt2]) AS [time], IIf(Format([felt2],"nn")>=30,"30-00","00-30") AS minut, Sum(antal) AS SumOfantal FROM Tabel1 GROUP BY dato, Hour([felt2]), IIf(Format([felt2],"nn")>=30,"30-00","00-30"); Niels
SELECT tblny.id, Sum(tblgl.Antaloffelt2) AS SumOfAntaloffelt2 FROM tblny, tblgl WHERE (((tblgl.felt2) Between [tblNy].[fratid] And [tblny].[tiltid])) GROUP BY tblny.text HAVING (((Sum(tblgl.Antaloffelt2))>0));
SELECT tblny.id, Sum(tblgl.Antaloffelt2) AS SumOfAntaloffelt2 FROM tblny, tblgl WHERE (((tblgl.felt2) Between [tblNy].[fratid] And [tblny].[tiltid])) GROUP BY tblny.id HAVING (((Sum(tblgl.Antaloffelt2))>0));
Din oprindelige 'tabel' ligner en forespørgsel. prøv at indsætte et nyt felt: nytFelt: IIf(Format([dateTimeFelt],"nn")>=30,"30-00","00-30") og grupper efter det
SELECT interval.id, Sum(data.AntalOfDato) AS SumOfAntalOfDato FROM interval, dato WHERE (((dato.tid) Between [interval].[fratid] And [interval].[tiltid])) GROUP BY interval.id HAVING (((Sum(dato.AntalOfDato))>0));
id autonumber dato date/time Antalofdato number tid date/time
tabel interval:
id autonumber fratid date/time tiltid date/time
SELECT interval.id, Sum(dato.AntalOfDato) AS SumOfAntalOfDato FROM interval, dato WHERE (dato.tid) Between [interval].[fratid] And [interval].[tiltid] GROUP BY interval.id HAVING Sum(dato.AntalOfDato)>0;
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.