Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not get this right
Message
 
 
To
26/05/2008 11:08:30
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01319440
Message ID:
01319509
Views:
10
>Hi Naomi, relax your brain ...
>try:
>
>SELECT People.cID,;
>       People.LName,;
>       People.FName,;
>       Home.Phone   AS Home,;
>       Office.Phone AS Office,;
>       Cell.Phone   AS Cell,;
>....
>FROM People;
>LEFT JOIN Phones Home ON People.cId == Home.cId AND Home.Type =='Home';
>LEFT JOIN Phones Office ON People.cId == Home.cId AND Office.Type =='Office';
>LEFT JOIN Phones Cell ON People.cId == Home.cId AND Cell.Type =='Cell'  ;
>....
>
I believe I tried this variation too and it didn't work as I wanted it to.

What would you get if you have, say, 2 home phones and 1 cell and no e-mail, for example?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform