dbTalk Databases Forums  

laufende summe durch sql abfrage in access

comp.databases.ms-access comp.databases.ms-access


Discuss laufende summe durch sql abfrage in access in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ernst Rutz
 
Posts: n/a

Default laufende summe durch sql abfrage in access - 08-05-2003 , 02:57 PM






Hallo Access – sql Profis

Ein wahrscheinlich nur kleines Problem

Quelle : Tabelle: Handel

ID_Nr Datum Haendler Gewicht Gebuehr EinAus Anzahl
1 01.01.02 225 25 18 1 5
2 01.03.02 225 18 16 -1 8
3 15.02.02 225 21 10 -1 3
4 01.03.02 228 20 12 1 6
5 01.02.02 225 22 11 1 4
6 15.02.02 228 21 61 1 7


Ziel:
Query Ausgabe wie folgt:
Ausgabe sämtlicher Daten nur eines Händlers (z.B. WHERE Haendler =
225)
Sortierung der Ausgabe nach Datum.
Laufende Summe der Anzahl (Bestand)
Kg (Gewicht) und Fr. (Betrag) jedes Datensatzes

ID_Nr Datum Haendler kg Fr EinAus Anzahl LSumm
1 01.01.02 225 25 18 1 5 5
5 01.02.02 225 22 11 1 4 9
3 15.02.02 225 21 10 -1 3 6
2 01.03.02 225 18 16 -1 8 -2


6 15.02.02 228 21 61 1 7 7
4 01.03.02 228 20 12 1 6 13

Die laufende Summe habe ich hingekriegt und funktioniert problemlos.
Sobald ich aber entweder eine WHERE-Klausel oder eine Sortierung
einbaue, produziert meine SQL-Abrage nur noch Schrott.

Wer weiss Rat im SQL-Tschungel.

Herzliche Grüsse aus dem sonnigen (und saftig grünen) Appenzellerland

Ernst

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.