Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need help with Select SQL
Message
From
01/05/1998 13:04:13
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00096128
Message ID:
00096317
Views:
23
>>>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. :)

if you ask me - mine is much simpler than the one you listed above- you have 5 SELECTS 4 of which are sub queries and mine has two simeple ones.
the only diff is I didn't use shortcuts for table names

IAC , whatever you got that works is good for you

Arnon
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform