Unanswered: help with REF OID USER DEFIEND column name
We have the table names and the dependent view names. In DDL of the view , table column names have been renamed to different view column names. How can I programatically derive the original table column name from a view column name. Is there any system table or procedure that decodes the name reference ? "
I think the procedure below may be the key to get table column name from view column name , but the procedure is failing at 'REF to ' and REF (ds) syntax. ds is not being recognized.
DECLARE PTRef REF to prescribed_tm;
SELECT REF(ds) INTO PTRef
FROM MK111.prj_drug_screen_prf_tbl ds
WHERE ds.protcl_id = 10111123;
I found this related topic at the web:
You can obtain a REF to a row object by selecting the object from its object table and applying the REF operator. For example, you can obtain a REF to the purchase order with identification number 1000376 as follows:
DECLARE OrderRef REF to purchase_order;
SELECT REF(po) INTO OrderRef
FROM purchase_order_table po
WHERE po.id = 1000376;