-
Apr 19th, 2002, 10:14 AM
#1
Thread Starter
Lively Member
SQL problem
Hi all,
with the following command in sql i have some problems:
SELECT verkoop.produkt AS omschrijving, verkoop.datum as datumverk, Sum(verkoop.aantal) AS totaal, verkoop.datum, Sum([prijseuro]*[aantal]) AS Totprijs, " FROM verkoop LEFT JOIN produkten ON verkoop.produkt = produkten.omschrijving GROUP BY verkoop.produkt, verkoop.datum HAVING ((verkoop.produkt)<>'Laten Staan') and (verkoop.datum) between #" & Format$(PrintDialog.calbegin.Text, "mm/dd/yyyy") & "# and #" & Format$(PrintDialog.caleinde.Text, "mm/dd/yyyy") & "# "
This piece of code i use to get all the info about sales from an access database.
I give an example to explain:
on thursday you sell 3 packets of cigarets and 2 patotoes
on friday you sell 2 packets of cigarets and 3 bottles wine
Normaly the output of my report must be
5 packets of cigarets
2 patatoes
3 botles whine
but the output is as follow
3 packets of cigaretes
2 packets of cigaretes
2 patatoes
3 bottles wine
he doesn't count it over several days ...
Is there anyone who can help me with this problem?
thx
-
Apr 19th, 2002, 10:57 AM
#2
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|