Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need help with Select SQL
Message
From
01/05/1998 12:20:56
 
 
To
30/04/1998 19:38:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00096128
Message ID:
00096305
Views:
24
>>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,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform