How can we help you today? How can we help you today?

Tables joined by a matching column name

After enabling the "Tables joined by a matching column name" option, candidate list includes self-joins. For example, with the following tables (clear cache after creating tables):
CREATE TABLE Dim  
(DimID int NOT NULL PRIMARY KEY,
 Attr1 int,
 Attr2 int)
CREATE TABLE Fact 
(FactID int NOT NULL PRIMARY KEY,
 DimID int NOT NULL,
 Measure1 int,
 Measure2 int)
... typing the following:
SELECT * FROM Fact JOIN Dim ON
... causes the following candidate list to appear:
    Dim.Attr1 = Dim.Attr1 Dim.Attr2 = Dim.Attr2 Dim.DimID = Dim.DimID Dim.DimID = Fact.DimID Fact.DimID = Dim.DimID Fact.DimID = Fact.DimID Fact.FactID = Fact.FactID Fact.Measure1 = Fact.Measure1 Fact.Measure2 = Fact.Measure2
Dean
0

Comments

1 comment

  • Bart Read
    Hi Dean,


    Thanks for reporting this. That's a bug in SQL Prompt 2. At the moment its JOIN functionality isn't quite as bright as it ideally would be, however we're going to be fixing this in version 3, which all being well should be available sometime in September.


    Many thanks,
    Bart Read
    0

Add comment

Please sign in to leave a comment.