Created
February 27, 2013 00:51
-
-
Save jmelloy/5043872 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT lines.lineitem, lines.description, lines.partid, | |
lines.unitprice, lines.quantity | |
FROM purchaseorder, | |
XMLTable('for $i in /PurchaseOrder/LineItems/LineItem | |
where $i/@ItemNumber >= 8 | |
and $i/Part/@UnitPrice > 50 | |
and $i/Part/@Quantity > 2 | |
return $i' | |
PASSING OBJECT_VALUE | |
COLUMNS lineitem NUMBER PATH '@ItemNumber', | |
description VARCHAR2(30) PATH 'Description', | |
partid NUMBER PATH 'Part/@Id', | |
unitprice NUMBER PATH 'Part/@UnitPrice', | |
quantity NUMBER PATH 'Part/@Quantity') | |
lines; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment