Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about joins
Message
 
 
To
26/08/2007 15:36:20
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01250511
Message ID:
01250518
Views:
15
The '*' in the field list tells a query to return all fields from all joined tables. You have to prefix it with the table name if you want to return fields from that table only
SELECT invitempost .*,design.description FROM invitempost
  INNER JOIN design ON invitempost.descode = design.descode
>I am a bit familar with SQL queries, but the Foxpro twist is causing me a few headaches.
>
>I would expect the following query to give me a list of all fields in table a and 1 field in table b, but it renames any of the fields in table a with an _a that conflict with names in the joined table even though I am not questing them.
>
>SELECT invitempost .*,design.description FROM invitempost INNER JOIN design ON invitempost.descode = design.descode
>
>I don't want to specifically list the fields from table a that I want because there are easily 100 fields in that table and I plan on using this sql statement in many areas and don't want to constantly have to update them. I am sure there is an easy answer.....
>
>-Randy
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform