>>select a.client_num, a.client_src, a.fname, a.lname;
>>from clients a;
>>where (a.client_num IN (select b.client_num from bal b);
>> and a.client_src IN (select b.client_src from bal b));
>> or (a.client_num IN (select c.client_num from ver c);
>> and a.client_src IN (select c.client_src from ver c));
>>into cursor bc && Billed Clients
>>
>>Thanks!
>
>something like the following should also do it
>
>SELECT DISTINCT Clients.Client_num,Clients.Client_SRC,Clients.FName,Clients.LName ;
> FROM Clients;
> inner join Bal;
> on Clients.Client_SRC+STR(Clients.Client_Num)=Bal.Client_SRC+STR(Bal.Clients_Num)
>union ;
>SELECT Clients.Client_num,Clients.Client_SRC,Clients.FName,Clients.LName ;
> FROM Clients;
> inner join Ver ;
> on Clients.Client_SRC+STR(Clients.Client_Num)=Ver.Client_SRC+STR(Ver.Clients_Num)
>into cursor bc
>
>
>Arnon
Yikes! I think you get the prize for the most complicated. :)
Well, I ran it, and it didn't work, but that was because in one of the tables the paysource field is reccom_by, not client_src. But I changed that and now it's working fine.
Now if I could just figure out why the invoices say no one owes any money...
Thanks,