SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 6] - Mouse hover popup

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 6] - Mouse hover popup
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2141

Post [SA 6] - Mouse hover popup Reply with quote
Let's suppose you have two tables, one of them having a foreign key to the other. For some strange reason one column of the compound foreign key has exactly the same name as the table being referenced.
You have a SELECT query joining these tables. Now if you hover the mouse cursor over the joined table instead of showing the table details for the table it shows the column detail for the column having the same name as the table.

But I think it's easier to give an example:

example:
Code:

USE tempdb
GO

--++++++++++ TABLE : dbo.table1 ++++++++++--
CREATE TABLE dbo.table1
(
   id_table1  INT NOT NULL
   ,valami    INT NULL
   ,mikortol  DATETIME NOT NULL
   ,meddig    DATETIME NULL
)
GO

ALTER TABLE dbo.table1 ADD CONSTRAINT PK_table1 PRIMARY KEY CLUSTERED(id_table1 ASC , mikortol ASC)
GO


--++++++++++ TABLE : dbo.table2 ++++++++++--
CREATE TABLE dbo.table2
(
   id_table2    INT NOT NULL
   ,valami_mas  INT NULL
   ,stajsz      NCHAR(20) NULL
   ,table1      INT NOT NULL
   ,mikortol    DATETIME NOT NULL
)
GO

ALTER TABLE dbo.table2 ADD CONSTRAINT PK_table2 PRIMARY KEY CLUSTERED(id_table2 ASC)
GO



ALTER TABLE dbo.table2 ADD CONSTRAINT
   FK_table2__table1 FOREIGN KEY(table1 ,mikortol) REFERENCES dbo.table1(id_table1 ,mikortol)   
GO


SELECT
   t2.id_table2
   ,t2.table1
   ,t2.mikortol
   ,t1.id_table1
   ,t1.mikortol
FROM
   dbo.table2 t2
   INNER JOIN
   dbo.table1 t1 -- hovering the mouse over dbo.table1 should show table desc. instead it shows column desc for column table1 from table2
      ON   t1.id_table1 = t2.table1
      AND   t1.mikortol = t2.mikortol

Wed Sep 14, 2011 8:45 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2141

Post Reply with quote
It also affects ctrl+clicking the table name which should show table data but shows column data for another table having a column with the same name as the table.
Tue Oct 18, 2011 4:48 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Reply with quote
It is a known issue. The internal parser uses the cache to lookup objects and columns by name, and the lookup cannot distinguish objects and columns having the same name. Unfortunately the impact is wider than just mouse-over hints, it also impacts refactoring and some other functions.
Tue Oct 18, 2011 8:09 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Reply with quote
For the reference, ticket #SA14880 - based on notes in the ticket, a fix has been implemented, but not yet tested, currently waiting for testing and release, most likely as part of 6.1 maintenance release.
Wed Oct 19, 2011 9:06 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2141

Post Reply with quote
Thank you for the feedback. I guess there is no info on the date of release yet, right?
Wed Oct 19, 2011 9:29 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Reply with quote
Sorry, it's not yet known.
Fri Oct 21, 2011 8:21 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.