Cross Join
torsten.strauss
Posts: 271 Silver 3
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
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
Tagged:
Answers
Thanks for your feedback on this!
It looks like the "Place JOIN keyword on new line" option applies correctly, but the "Place JOIN table on new line" and "indent JOIN table" options don't.
I've created an issue for this with internal reference SP-6989 and will post any updates to it here. Thanks again!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
Torsten