// == Delphi Code ===================================================
sel := TSelectQuery.Create;
sel.Select(NW.Order.OrderID)._(NW.Order.OrderDate)
._(NW.Order.RequiredDate)._(NW.OrderDetail)
.From(NW.Order)._(NW.OrderDetail)
.Where(OQL.Criteria(NW.Order.EmployeeID).EQ(5)
.And_(NW.Order.ShipVia).EQ(1)
.And_(NW.Order.OrderID).EQ(NW.OrderDetail.OrderID))
.OrderBy(NW.Order.OrderID);
==== sql output for Microsoft Sql Server ============================
SELECT
[Orders].[OrderID]
, [Orders].[OrderDate]
, [Orders].[RequiredDate]
,
[Order
Details].*
FROM
[Orders] , [Order Details]
WHERE
[Orders].[EmployeeID]
= 5
AND
[Orders].[ShipVia]
= 1
AND
[Orders].[OrderID]
= [Order Details].[OrderID]
ORDER BY
[Orders].[OrderID]
==== sql output for Oracle =========================================
SELECT
"Orders"."OrderID"
, "Orders"."OrderDate"
, "Orders"."RequiredDate"
,
"Order
Details".*
FROM
"Orders" , "Order Details"
WHERE
"Orders"."EmployeeID"
= 5
AND
"Orders"."ShipVia"
= 1
AND
"Orders"."OrderID"
= "Order Details"."OrderID"
ORDER BY
"Orders"."OrderID" |