Cross Join

torsten.strausstorsten.strauss Posts: 271 Silver 3
edited May 17, 2018 9:53PM in SQL Prompt
Hi Redgate Team,

It seems that CROSS JOIN is not formatted correctly - it should follow the JOIN formatting style.

[code]
USE AdventureWorks2017;
GO

SELECT TOP 100
    a.SalesOrderID
,    a.SalesOrderDetailID
,    a.CarrierTrackingNumber
,    a.OrderQty
,    a.ProductID
,    a.UnitPrice
,    a.UnitPriceDiscount
FROM
    Sales.SalesOrderDetail a
-- Should look like the INNER JOIN example
CROSS JOIN Sales.SalesOrderDetail b;

SELECT TOP 100
    a.SalesOrderID
,    a.SalesOrderDetailID
,    a.CarrierTrackingNumber
,    a.OrderQty
,    a.ProductID
,    a.UnitPrice
,    a.UnitPriceDiscount
FROM
    Sales.SalesOrderDetail a
INNER JOIN
    Sales.SalesOrderDetail b
ON
    a.SalesOrderID = b.SalesOrderID;
[/code]

Would be nice to see a fix!

Thanks!

Torsten

Answers

Sign In or Register to comment.