Results 1 to 1 of 1
  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Unanswered: help with REF OID USER DEFIEND column name

    Hi,
    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;

    BEGIN

    SELECT REF(ds) INTO PTRef
    FROM MK111.prj_drug_screen_prf_tbl ds
    WHERE ds.protcl_id = 10111123;
    END;

    "
    I found this related topic at the web:

    Obtaining REFs
    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;
    Last edited by chowdhut; 03-04-04 at 15:25.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •