on 05-02-2016 6:04 AM
Hi Gurus,
i need a query to show me a supplier who has invoiced me 5 or less time in a month
Regards
Francis
what do you mean.
what is the requirement, you need the balance of the supplier also?
Rgds
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please try this:
SELECT T0.[CardCode],
T0.[CardName],
COUNT(T0.docnum) as Count
FROM OPCH T0
WHERE T0.[DocDate] BETWEEN [%0] AND [%1]
GROUP BY
T0.[CardCode],
T0.[CardName]
HAVING COUNT(docnum) <= '5'
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this
SELECT T0.[CardCode],
T0.[CardName],
COUNT(docnum)
FROM OPCH T0
WHERE T0.[DocDate] BETWEEN [%0] AND [%1]
GROUP BY
T0.[CardCode],
T0.[CardName]
HAVING COUNT(docnum) <= '5'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
9 | |
9 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.