Home Dashboard Directory Help
Search

Query Designer masks join errors by wBob


Status: 

Closed
 as Won't Fix Help for as Won't Fix


1
0
Sign in
to vote
Type: Bug
ID: 795542
Opened: 7/31/2013 9:15:14 AM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Whilst looking at the Query Designer in Management Studio 2012 for a newsgroup post, I noticed it incorrectly translates bad joins, eg given the following query with a "bad" Cartesian join, the designer represents it as it should be, rather than correctly translating the text:

USE AdventureWorksDW

SELECT *
FROM dbo.FactInternetSales AS f
    INNER JOIN dbo.DimProduct AS p ON f.ProductKey = p.ProductKey
    INNER JOIN dbo.DimCustomer AS c ON f.CustomerKey = f.CustomerKey
WHERE p.ListPrice > 50
AND c.Gender = 'M'

I was going to suggest to the OP they could use the GUI to help visualise bad queries / check for Cartesian products, but it looks like they can't.
Details
Sign in to post a comment.
Sign in to post a workaround.
Posted by wBob on 7/31/2013 at 5:07 PM
Don't ever use the SSMS Query Designer GUI.
File Name Submitted By Submitted On File Size  
SQL 2012 Bad GUI.png 7/31/2013 66 KB
SQL 2012 Bad GUI.sql 7/31/2013 244 bytes