I am new to Progress DB (used to work with SQL Server). In SQL Server there is a neat feature for preparing subselects ('with' keyword).
How can I write this query in Progress:
How can I write this query in Progress:
Code:
[B]WITH ProductAndCategoryNamesOverTenDollars (ProductName, CategoryName, UnitPrice) AS
(
SELECT
p.ProductName,
c.CategoryName,
p.UnitPrice
FROM Products p
INNER JOIN Categories c ON
c.CategoryID = p.CategoryID
WHERE p.UnitPrice > 10.0
)[/B]
SELECT *
FROM [B]ProductAndCategoryNamesOverTenDollars[/B]
ORDER BY CategoryName ASC, UnitPrice ASC, ProductName ASC