Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQuery
Message
From
09/05/2008 09:25:25
 
General information
Forum:
Visual FoxPro
Category:
Stonefield
Title:
Re: SQuery
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01308261
Message ID:
01316056
Views:
19
Hi Naomi.

>I've created SubTables for all various kinds of phones. My question is - can I use several subtables of the same table in the same report? It's essentially the same field (Phone), so somehow I need to have it aliased differently.
>
>Is it possible?

Yes. A subtable essentially becomes an aliased name for another instance of the same table. For example, suppose you have subtables of Phones called HomePhone (with a subtable filter of HomePhone.PhoneType = 'Home') and CellPhone (with a subtable filter of CellPhone.PhoneType = 'Cell'). Including both of these in a report would result in a SQL statement similar to this:
select Contacts.Name, HomePhone.PhoneNumber, CellPhone.PhoneNumber
  from Contacts join Phones HomePhone on (whatever)
  join Phones CellPhone on (whatever)
Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform