An object view references itself?
Hi, How can a view references itself? Here is an example
CREATE OR REPLACE VIEW oe.oc_customers (
customer_id,
cust_first_name,
cust_last_name,
cust_address,
phone_numbers,
nls_language,
nls_territory,
credit_limit,
cust_email,
cust_orders
)
AS
SELECT c.customer_id, c.cust_first_name, c.cust_last_name, c.cust_address,
c.phone_numbers,c.nls_language,c.nls_territory,c.credit_limit,
c.cust_email,
CAST(MULTISET(SELECT o.order_id, o.order_mode,
MAKE_REF(oe.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,
CREATE OR REPLACE VIEW oe.oc_customers (
customer_id,
cust_first_name,
cust_last_name,
cust_address,
phone_numbers,
nls_language,
nls_territory,
credit_limit,
cust_email,
cust_orders
)
AS
SELECT c.customer_id, c.cust_first_name, c.cust_last_name, c.cust_address,
c.phone_numbers,c.nls_language,c.nls_territory,c.credit_limit,
c.cust_email,
CAST(MULTISET(SELECT o.order_id, o.order_mode,
MAKE_REF(oe.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,
0