SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Fully Qualified Object Names not working for selected joins
Goto page 1, 2  Next
 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Fully Qualified Object Names not working for selected joins
Author Message
judahr



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

Post Fully Qualified Object Names not working for selected joins Reply with quote
v. 5.0.96 Pro
Option Always Fully Qualify Object Names: "With schema name"

Select field1
From dbo.Table1 t
INNER JOIN

At this point you get a popup list of possible foreign keys. If you select one the foreign keys the table names aren't fully qualified anymore.
Fri Apr 30, 2010 4:37 pm View user's profile Send private message
judahr



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

Post Reply with quote
5.0.97 - same issue.

To clarify:

Select field1
From dbo.Table1 t
INNER JOIN


Selecting a foreign key results in:

Select field1
From dbo.Table1 t
INNER JOIN Table2 t2 on t.field1 = t2.field1

in should say

Select field1
From dbo.Table1 t
INNER JOIN dbo.Table2 t2 on t.field1 = t2.field1
Mon May 24, 2010 10:44 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Thank you! I entered new issue to our internal tracking system. Bug id SA-10638
Mon May 24, 2010 11:21 am View user's profile Send private message
Olegon



Joined: 07 Sep 2009
Posts: 39
Country: Kazakhstan

Post Reply with quote
It is necessary functional.
When will be fixed?
Thanks
Mon Jun 21, 2010 1:19 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
You can bypass that (until it's fixed) by not selecting the foreign key but the table first (that way it gets qualified) and after typing keyword 'ON' you can still select the foreign key. It's a bit messy and requires a few more keypresses but at least the tablenames get qualified.

By the way, it would be nice to have a hotkey for Refactoring -> Qualify object names. Currently it can only be reached from (popup)menu...
Mon Jun 21, 2010 3:29 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
That fix will be available in the next maintenance release 5.1.

If you are interested in an early preview, please email to support and ask for a download link for a private build 5.0.120 or a later build.
Mon Jun 21, 2010 9:02 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
Is there a changelog for that build?
Mon Jun 21, 2010 9:32 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
I'm not sure if you refer to 5.1 or 5.0.120. Change log for 5.1 is incomplete, that one is not yet available. If you mean 5.0.120, this build contains all incremental changes made since 5.0.97 including bug fixes and some new features. This is a private build, which is available to users with effective license maintenance and provided upon request or recommended by tech support to resolve certain known issues - schema name qualification in joins is among them.
Mon Jun 21, 2010 11:41 am View user's profile Send private message
judahr



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

Post Reply with quote
5.0.120 doesn't resolve the issue.
Thu Jun 24, 2010 9:43 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
It appears that you need to reload default SQL Assistant settings for JOIN query definitions in order for that fix to work correctly. Please let us know if that doesn't help.
Thu Jun 24, 2010 6:20 pm View user's profile Send private message
judahr



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

Post Reply with quote
Is there a way I can get it without messing up my settings?
Fri Jun 25, 2010 11:16 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
As I see, it's enough to only reload the DB Queries part of setup.sas. You probably did not change those. Personally, I exported my settings, reloaded the default, and after that imported snippets and formatting settings from the export to overwrite defaults.
Fri Jun 25, 2010 2:36 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
That's correct. Reloading just db queries should be enough.

By the way, I found out today that the referenced fix for qualifying table names in table joins fixes schema/table name qualifications, but doesn't fix cases for database/schema/table names. It appears that a more recent fix is already available for dealing with database/schema/name auto-qualified names in table joins.
Fri Jun 25, 2010 10:54 pm View user's profile Send private message
Olegon



Joined: 07 Sep 2009
Posts: 39
Country: Kazakhstan

Post Reply with quote
5.1.7 doesn't work

Option Always Fully Qualify Object Names: "With database and schema names"

Example:
Code:
use master
go

select
  *
from
  Northwind.dbo.Categories c
  inner join


Selecting a foreign key:

Code:
select
  *
from
  Northwind.dbo.Categories c
  inner join master.dbo.Products p
    on
      p.CategoryID = c.CategoryID



mast be:

Code:
select
  *
from
  Northwind.dbo.Categories c
  inner join Northwind.dbo.Products p
    on
      p.CategoryID = c.CategoryID


In old version (4.8.29) was OK. Why in new versions so bad?
Thu Aug 19, 2010 5:56 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Thank you. This example is very helpful. I can reproduce this too. The fix doesn't work when the current database context is not the same as in database containing the referenced tables. I'll report this to the development
Thu Aug 19, 2010 8:20 am 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
Goto page 1, 2  Next
Page 1 of 2

 
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.