Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoid the _a and _b when selecting * from both tables?
Message
 
To
12/10/2004 16:33:31
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00950839
Message ID:
00950936
Views:
15
Jay,

>
> without having to specify the actual fields to get all the
> columns from table A, named as they exist, and then all the remaining
> fields from table B. I do not want to specify the fields that are
> common to both tables. I want matching records and only 1 occurance
> of all columns.
>

There is no such function in VFP. You'll need to write Yourself a small function that
returns a koma-separated string, containing the unique fieldnames and then do
lcFields = GetUniqueFieldNames("TableA", "TableB")

select &lcFields from TableA A, TableB B ....
The function must also add the local Alias (A or B or whatever You choose).

Also, how does the function know which of the two equal fieldnames You like to have?
If You have SUPPLIER and PRODUCTS and both of them have a field "NAME", do You want the
Supplier's name or the Product-Name.
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform