Hi all,
I have two tables, both are relationed,(one-to-many).One contains clients and the other payments.Now, how can I search clients that haven´t yet paid in the current month and in the current year the monthly fee ?
Is it correct ?
SELECT Clients.lname, Clients.fname, Payments.date;
FROM myDatabase!clients INNER JOIN myDatabase!payments ;
ON Clients.id_client = Payments.id_client;
WHERE Clients.id_client NOT IN (Payments.id_client);
AND (Payments.month_cancelled = ?cMonth;
AND Payments.year = ?cYear);
GROUP BY Clients.lname;
ORDER BY Clients.lname
Thanks in advance