G
Guest
I have an invoice table which monitors marketing information. I want to
extract the latest information for a client but EXCLUDE any invoices for
monthly support identified as BSO payments. I have this so far
SELECT t.CODE, t.CLIENT, t.INV_MONTH, t.WHYBOOK
FROM Transinv AS t
WHERE (((t.INV_MONTH)=(SELECT Max(inv_month) FROM Transinv WHERE code =
t.code)) AND ((t.WHYBOOK) Not Like "185 bso*"));
The problem I have is that if the latest invoice is identified as BSO then I
get nothing for that client rather than the latest 'normal' invoice. Must
have my WHERE wrong somewhere I think (don't really use SQL much).... any
help much appreciated.
Sheila
extract the latest information for a client but EXCLUDE any invoices for
monthly support identified as BSO payments. I have this so far
SELECT t.CODE, t.CLIENT, t.INV_MONTH, t.WHYBOOK
FROM Transinv AS t
WHERE (((t.INV_MONTH)=(SELECT Max(inv_month) FROM Transinv WHERE code =
t.code)) AND ((t.WHYBOOK) Not Like "185 bso*"));
The problem I have is that if the latest invoice is identified as BSO then I
get nothing for that client rather than the latest 'normal' invoice. Must
have my WHERE wrong somewhere I think (don't really use SQL much).... any
help much appreciated.
Sheila