Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Complex Select - SQL
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Complex Select - SQL
Miscellaneous
Thread ID:
00481466
Message ID:
00481466
Views:
80
I have 3 tables (clients,cliaddr,cliphon) the 3 are related by caccountid field.
What i need is a result table that shows the following field with this rules:

-clients.caccountid
-cliaddr.caddress
-cliphon.cphnumber

Result table tempacct

When a client in clients.dbf doesn't have any record in cliaddr show .null. in tempacct.caddress
When a client in clients.dbf doesn't have any record in cliphon show .null. in tempacct.cphnumber

In the case that multiple records exist in cliaddr & cliphon for one client record in clients show different records in tempacct with the corresponding data.

I tried with Join command in the select - sql and also with "where !EXITS (Select...)" but always get diferent result and not the above one.
Francisko Paternoster
fpater@patercorp.com
Next
Reply
Map
View

Click here to load this message in the networking platform