Difference between revisions of "OE.OC ORDERS (view)"
(New page: == wikibot == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- | '''view | OE.OC_ORDERS |- |} <pre> </pre>) |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" | ||
| − | |- | + | |- valign="top" |
| − | | ''' | + | | '''View |
| OE.OC_ORDERS | | OE.OC_ORDERS | ||
| − | |||
|} | |} | ||
| + | === Source === | ||
<pre> | <pre> | ||
| − | + | CREATE OR REPLACE VIEW OE.OC_ORDERS AS | |
| + | SELECT o.order_id, o.order_mode,MAKE_REF(oc_customers,o.customer_id), | ||
| + | o.order_status,o.order_total,o.sales_rep_id, | ||
| + | CAST(MULTISET(SELECT l.order_id,l.line_item_id,l.unit_price,l.quantity, | ||
| + | make_ref(oc_product_information,l.product_id) | ||
| + | FROM order_items l | ||
| + | WHERE o.order_id = l.order_id) | ||
| + | AS order_item_list_typ) | ||
| + | FROM orders o | ||
</pre> | </pre> | ||
Latest revision as of 10:34, 27 August 2011
wikibot[edit]
| View | OE.OC_ORDERS |
Source[edit]
CREATE OR REPLACE VIEW OE.OC_ORDERS AS
SELECT o.order_id, o.order_mode,MAKE_REF(oc_customers,o.customer_id),
o.order_status,o.order_total,o.sales_rep_id,
CAST(MULTISET(SELECT l.order_id,l.line_item_id,l.unit_price,l.quantity,
make_ref(oc_product_information,l.product_id)
FROM order_items l
WHERE o.order_id = l.order_id)
AS order_item_list_typ)
FROM orders o