SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Future JOIN Enhancement

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Future JOIN Enhancement
Author Message
kevin83177



Joined: 18 Apr 2007
Posts: 10
Country: United States

Post Future JOIN Enhancement Reply with quote
Could I suggest that when you join tables that do not have FK references, that it look for same named fields as possible JOIN fields. That would be helpful for tables that are not in the same database.
Fri Dec 28, 2007 12:26 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
Thanks for the suggestion.

From a performance point of view this is extremely inefficient and leads to a design problem. The client would need to cache catalog data from all the databases on the server. Try it with any database hosting an ERP application like SAP and you will know right away what I am talking about.

This is actually a fatal design flow in SQL Prompt. It just cannot be used in large databases.
Fri Dec 28, 2007 12:41 pm View user's profile Send private message
judahr



Joined: 09 Mar 2007
Posts: 319
Country: United States

Post Reply with quote
What if you could optimize something like this:

Select *
From dbo.Table1 t1
INNER JOIN Database2.dbo.Table2 t2
ON t1.ID =

At this point you can suggest t2.ID if it exists. Then in this case:

Select *
From dbo.Table1 t1
INNER JOIN Database2.dbo.Table2 t2
ON t2.ID =

You could search only the tables in the From for an ID and suggest it.

One step further:

Select *
From dbo.Table1 t1
INNER JOIN Database2.dbo.Table2 t2
ON

At this point suggest matches between 1. primary keys in the from tables (excluding t2) and same named columns in t2 as well as 2. Primary key in t2 and same named coumns in from tables (excluding t2).
Fri Dec 28, 2007 2:04 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
This is possible, but requires that you already have all tables in the FROM. I will submit this suggestion as an enhancement request.


By the way, in a simple case with relational constraints, the fastest method to enter a join (minimum keystrokes) is to pick the first table then type JOIN keyword and then in the new popup expand the target table and pick the JOIN clause. SQL Assistant will insert both the joined table name including an alias and the complete next line including the JOIN condition.
Fri Dec 28, 2007 3:06 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.