|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
judahr
Joined: 09 Mar 2007 Posts: 319 Country: United States |
|
[SA Beta 6] Join Suggestion |
|
v 6.0.33
Assuming a FK relationship exists between Table1 and Table2 on Field names that are not named the same.
|
|
Select *
From dbo.Table1 t
Left Outer Join dbo.Table2 tCustom
ON tCustom.Field2 = |
At this point join suggestions appear, but for tables not in the query. If you select one, you get something like this:
|
|
ON tCustom.Field2 = dbo.Table3 t3 ON t3.Field3 = tCustom.Field2 |
I think = should show join suggestions for tables that are in the query, not those that are not. ... JOIN is good to show the FK's
|
|
Thu Jul 14, 2011 4:13 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
It offers join suggestions for all known foreign keys for all tables referenced in the query. If you select one of them, SQL Assistant will generate and insert the complete JOIN clause, including table names, aliases, and not just column names.
It is much more efficient to select required joins immediately after typing JOIN keyword by column references in that box, rather than typing JOIN then selecting a table then typing ON keyword then typing an alias then selecting a column then typing equal sign and so on...
|
|
Thu Jul 14, 2011 6:46 pm |
|
|
judahr
Joined: 09 Mar 2007 Posts: 319 Country: United States |
|
|
|
Yes, I'm familiar with the join suggestion feature. I think the issue is showing or inserting tables after an = sign. After the join keyword makes sense. but = should show candidate columns only.
Here is what would make more sense (and how I thought it has been working prior to 6). After typing this: you get this
Join: Candidate joins with table names and column pairs. Tables limited to FK's to tables currently with relationships. Both the chosen table and column pairs inserted.
On: Candidate joins with table names and column pairs. Limited to only currently reference tables. Chosen column pairs only inserted.
= or between or similar: Candidate columns. Limited to only currently referenced tables. Preference given to either the table for the current join clause (or if that table is already on the left side of the equal, another table in the query). Chosen column name inserted only.
|
|
Fri Jul 15, 2011 10:13 am |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|