When I run the cross-schema update query I get the error message:
ORA-01031: insufficient privileges 01031. 00000 - "insufficient privileges".
Details are as follows:
I am trying to populate table (my_prod_price_tracking) in prod schema from the view (my_vw_product_price_info) which is there in CAT schema.
my_prod_price_tracking (table)Prod Schema.
my_vw_product_price_info (view)- CAT schema.
I have given grant select on my_vw_product_price_info to prod. So the inner Select query works fine. But when I run the update script I get the "ORA-01031: insufficient privileges" error.
Please let me know where am I going wrong.
Below is the query:
update (
select a.price_range_low current_lowest_price,
a.price_range_low lowest_price,
a.last_price_range_low last_lowest_price,
a.price_range_low_update_time,
b.lowest_price new_lowest_price
from my_prod_price_tracking a,
CATA.my_vw_product_price_info b
where a.product_id = b.product_id and
a.price_list_id = b.price_list_id and
a.price_range_low <> b.lowest_price
)up
set up.lowest_price = up.new_lowest_price,
up.last_lowest_price = up.current_lowest_price,
up.lowest_price_update_dt = sysdate
GRANT SELECT, INSERT, UPDATE, DELETE ON MY_PROD_PRICE_TRACKING TO PUBLIC
andGRANT SELECT, INSERT, UPDATE, DELETE ON MY_VW_PRODUCT_PRICE_INFO TO PUBLIC
. You may need to log in as the owning user to do this. Best of luck. – Bob Jarvis - Reinstate Monica