Hi all,
I have two tables, both are relationed,(one-to-many).Now, how can I search clients that haven´t yet paid in the current month the monthly fee ?That is, I want to get the names of those clients that haven´t paid.
I want to do this in a parameterized view but it doesn t work.
My view has the following code :
Select Clients.lName,Clientes.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)
order by clients.lName
Now somebody answer me that this code is wrong and put something like this :
Select clients.lName, clients.fName ;
from mydatabase!clients ;
where clients.id_client not in ;
(Select payments.id_client from payments ;
where payments.payment > 0 and ;
payments.month_cancelled <> ?cMonth ;
and payments.year <> ?cYear) ;
order by clients.lName
Now, how can I build the second one with the view designer ?
If it is so, in what place should I put the statement :
(Select payments.id_client from payments ;
where payments.payment > 0 and ;
payments.month_cancelled <> ?cMonth ;
and payments.year <> ?cYear)
What happens with the INNER JOIN Statement ?
Sorry, I m learning.
Thanks in advance