Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get debtors
Message
De
29/09/2000 14:53:02
Marcelo Codino
Mystic & Faith - Sistemas -
Buenos Aires, Argentine
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
How to get debtors
Divers
Thread ID:
00422803
Message ID:
00422803
Vues:
34
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform