Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field names after select
Message
 
To
30/10/1999 22:14:00
Ray Keys-Bramlett
Custom Business Applications
Fresno, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00284431
Message ID:
00284443
Views:
13
If you ONLY need the ID fields, then you can simply add them to the query:

select table1.*, table2.*, table1.ID AS ID1, table2.id as ID2 ;
from table1,table2 where ID1=ID2

This can be extended to any other fields that are duplicates.

HTH
Barbara


>I would like to combine all fields from two tables in an query.
>I was using a wild card to get the field names:
>
>select * from table1,table2 where table1.ID=table2.ID
>
>I may not know what all the fields are at a later date, so I don't want to list them in the query.
>
>The result of my query returns all the fields except the ID which is now stored in ID_A and ID_B. In this case ID_A and ID_B will always be the same and I would like them to be in the field ID.
>
>I know I can build a list of fields, build a string and use it in my query, but I am hoping for something elegent and simple, if it exists.
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform