Help obtaining physical model dim level column name please

I admit I haven't read all scripting posts (yet), nonetheless someone may be gracious enough to help me with understanding the object property structure involving physical model dimension level column names.
I imported the following from an 11g instance using a dictionary import (not a DDL file import) into a virgin 3.1.1 data modeler:
create table a_dim as select 1 key, 1 payload from dual;
create dimension a_dim
level level_1 is a_dim.key
The following Transformer Rhino Javascript succinctly exhibits my ignorance:
importPackage(Packages.javax.swing);
function test_get_dim_level_column_name(o)
JOptionPane.showMessageDialog(null, model.getDesign().getRelationalDesign().getSorageDesigns().toArray()[0].getDimensionSet().toArray()[0].getLevelSet()[0]);
JOptionPane.showMessageDialog(null, model.getDesign().getRelationalDesign().getSorageDesigns().toArray()[0].getDimensionSet().toArray()[0].getLevelSet()[0].getColumnSet());
JOptionPane.showMessageDialog(null, model.getDesign().getRelationalDesign().getSorageDesigns().toArray()[0].getDimensionSet().toArray()[0].getLevelSet()[0].getColumnSet().toArray()[0]);
The first result is LEVEL_1 as one would expect but the next two results are: B1ECDFB1-FE64-F728-8AB4-A5E7F098D02D rather than KEY.
I tried prosaic attacks such as getName() and I tried the abstruse things including determining that the class of this hex stringified result is: oracle.dbtools.crest.model.design.storage.oracle.LevelOracle$InlineList
My object inspection of this thingy left me clueless.

Re: “what are you trying to do?
- In the small: learn your object model and distill my ignorance into minimalist expositions
- In the large: The current reverse engineering from Oracle physical dimensional models to the MD model level has worked for me en masse but it seems to be unsuited for incremental development. Also subviews are not supported at the MD level. My goal is to create a transformer script to engineer selected Oracle physical model dimensions to multiple blank MD models and then manually add my subject area fact tables of interest. I expect to develop dozens, if not hundreds, of MD models.
Re: “Did you read README.rtf file in xmlmetadata\doc directory?
- No, I didn’t until this morning – it seems to be new with 3.1.1 since I don’t see it in the integrated SQL Developer Data Modeler 3.1.07 – thank you.
Re: “level.getColumns() - String is equal to level.getColumnset.toString() - it should return comma separated values (usually one) representing object ID
then when you get ID you can use model.getStorageDesign().getStorageObject( ID ) to get the object - the last is written in README.rtf file.
- Using your forum remarks and reading the README.rtf I was inspired to find my sought after “KEY” column name using:
var colid = model.getDesign().getRelationalDesign().getSorageDesigns().toArray()[0].getDimensionSet().toArray()[0].getLevelSet()[0].getColumnSet().toArray()[0];
var colname = model.getDesign().getRelationalDesign().getSorageDesigns().toArray()[0].getStorageObject(colid);
JOptionPane.showMessageDialog(null,colname);
- Thank you for helping with this indirection through the object IDs.
Some remarks en passant:
1)     Nit: getSorageDesigns should be getStorageDesigns as you likely have noted
2)     The developer workflow is clumsy – i.e. having to repeatedly open/close “Custom Libraries” slows down my iterative development. It be nice if I could leave it open
3)     In the integrated SQL Developer Data Modeler 3.1.07,: alt-T(ools) / alt-D(ata) Modeler does not allow progress into submenus
Thank you Philip.
- Kevin

Similar Messages

  • 11g bi publisher data model generic columns names for obiee data source?

    I'm just trying to figure out if this is a bug, expected behavior or installation problem. When I select an Oracle BI Analysis to add to the data model diagram the column names are not copied over. Instead they are all renamed as Column0-ColumnNN.
    Thanks
    Edited by: user13087422 on Apr 7, 2011 9:49 AM

    I'm facing this same issue. Can you solve that? What's the problem with it?
    Regards,
    Ariel

  • Column name using narrative

    Hi all,
    i want to get the column name in my narrative view for my particular requirement.
    how can i do it?? is there any variable like @1 like we access data row by row
    but i need column name.please help me
    Regards,
    Pavan

    hi,
    you want to appear the physical table name or the logical one???
    (general advice),try to make things at your Db and not in Bi....
    So,you can add an extra column at every table which holds the name....and get the name by hiding the column in the bi report and get it through @1..2.3...
    i hope i helped....
    http://greekoraclebi.blogspot.com/
    ///////////////////////////////////////

  • Can I use bind variable instaed of writing static COLUMN Name

    Hi , I am having a table containing id and column names, the data is stored against that id in other tables. Now I wish to update data into another table so that it goes into apppropriate column without using decode function.
    I am trying to do this:
    EXECUTE IMMEDIATE 'update TEST set :1 = :2
    where PROJECT_ID= :3 and UNIQUE_ID= :4' using P_DEST_COLUMN, P_TEXT_VALUE, P_PROJ_ID, P_TASK_UID;
    the values P_DEST_COLUMN, P_TEXT_VALUE, P_PROJ_ID, P_TASK_UID are populated using a cursor in PL/SQl
    Is this statement valid? If not can you tell me how to do it as I am getting some error I am unable to comprehend.
    thanks
    Rishabh

    Column names cannot be substituted at run-time as bind variables. If you need to specify the column name at run-time, you'd need to construct a new string and execute that string dynamically, i.e.
    EXECUTE IMMEDIATE 'UPDATE test SET ' || p_dest_column || ' = :1 ' || ...From a data model standpoint, storing column names as data elements in another table is generally a rather poor idea. It's likely to make ad-hoc reporting nearly impossible and to cause a lot more parsing than would otherwise be required.
    Justin

  • JDBC send data to oracle, oracle only accept column name in Upper case

    Hi experts,
    I am doing a scenario File --> XI --> JDBC,  JDBC send data to a Oracle 10g database, I have configured JDBC receiver to use XML-SQL format. in oracle database ,  table "EMPLOYEE" has a column "NAME", but when I send data to oracle using JDBC receiver, the column is "name", then XI complains
    " 'EMPLOYEE' (structure 'insert'): java.sql.SQLException: FATAL ERROR: Column 'name' does not exist in table 'EMPLOYEE'.
    can anyone help me to let oracle accpet column "name". I can't change colum in JDBC receiver from "name" to "NAME".
    Thanks a lot.

    <i>can anyone help me to let oracle accpet column "name"</i>
    Making Oracle case insensitive is not possible (in my opinion). By default all object names are stored in UPPER case in the rdbms dictionary.
    When XI searches for column name in Oracle, this search is case sensitive. So u have to configure accordingly.
    Regards,
    Prateek

  • MITI Integrator for Erwin 4.1 - Physical Model does not import

    Hello,
    I'm running the MITI integrator in BOMM 3.0 for Ewrin 4.1
    I'm using an ER1 file that contains both the Logical and physical data model.
    When i explor the data in BOMM Explorer, i can only see the  Logical model.  There is a loose link to the physical model in the Technical Name field - but this does not seem to be completely accurate.  It looks like the integrator just takes the Logical name and replaces spaces with underscores.  This works in the following example where the logical name and physical name are essentially the same:
    Logical name: Customer Names
    Physical name: customer_names
    Technical name (parsed?): customer_names
    In the above example BOMM will generate a same as relationship between tables called customer_names and the Logical table "Customer Names".  this is what we are hoping to see. 
    The following example is where the problem occurs.
    Logical Name: Customer Names
    Physical Name: cstmr_nm
    Technical Name (parsed?): customer_names
    In the above scenario, BOMM is no longer able to draw the relationship from the logical name to the physical name.
    As I stated at the beginning  - it seems that the Integrator is only importing the logical model and then parsing the technical name out of that - we are using an NSM file to convert common terms to erwin standard abbreviations and we were wondering if the ingtegrator could leverege this file in some way.

    Hello,
    I'm running the MITI integrator in BOMM 3.0 for Ewrin 4.1
    I'm using an ER1 file that contains both the Logical and physical data model.
    When i explor the data in BOMM Explorer, i can only see the  Logical model.  There is a loose link to the physical model in the Technical Name field - but this does not seem to be completely accurate.  It looks like the integrator just takes the Logical name and replaces spaces with underscores.  This works in the following example where the logical name and physical name are essentially the same:
    Logical name: Customer Names
    Physical name: customer_names
    Technical name (parsed?): customer_names
    In the above example BOMM will generate a same as relationship between tables called customer_names and the Logical table "Customer Names".  this is what we are hoping to see. 
    The following example is where the problem occurs.
    Logical Name: Customer Names
    Physical Name: cstmr_nm
    Technical Name (parsed?): customer_names
    In the above scenario, BOMM is no longer able to draw the relationship from the logical name to the physical name.
    As I stated at the beginning  - it seems that the Integrator is only importing the logical model and then parsing the technical name out of that - we are using an NSM file to convert common terms to erwin standard abbreviations and we were wondering if the ingtegrator could leverege this file in some way.

  • Add Column names as Header Line

    Hi All
    I am tring to do a FILE to File scenario ,At Receiver end i am usin FCC to generate text flle.How to get the header names in the generated text file like
    FIELD1     FIELD2     FIELD3
    abc     12     34     
    def     13     35
    pqr     14     36
    my generated xml structure after mapping is as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:test_mt xmlns:ns0="http://test.com/FCC">
       <rootnode>
          <subnode>
             <FIELD1>abc</FIELD1>
             <FIELD2>12</FIELD2>
             <FIELD3>34</FIELD3>
          </subnode>
       </rootnode>
    </ns0:test_mt>
    i am using the following FCC parameters
    Recordset Structure :rootnode,subnode
    subnode.addHeaderLine   = 1
    rootnode.addHeaderLine = 1
    rootnode.fieldSeparator = 'nl'
    subnode.fieldSeparator = $
    subnode.endSeparator = 'nl'
    I am getting only records but not the header line with column names
    Please suggest me how do  i get the desired output?
    Regards
    satish

    Hello,
    the Headerline is only avaible if you have a "flat" structure.
    http://help.sap.com/saphelp_erp2005/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm
    NameA.addHeaderLine
    "This specification is only permitted if exactly one structure is defined."
    In this case I alsways use a structure to add the headerline manually! This is the best workaround I know.
    Regards,
    Björn

  • How can I edit column name/heading in Column Attributes?

    Hi All,
    In the link "*Home>Application Builder>Application 1000>Page 2>Report Attributes>Column Attributes*", can someone help me how to edit/modify 'Column Name' and 'Column Heading' ?
    Thanks in advance.
    Regards
    Sharath

    Hi,
    There is Headings Type radio buttons above report column attributes.
    Select Headings Type "Custom" and then you can change Headings.
    Column names (Alias) you need change to report query.
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Getting column names from cursor

    Hi all
    I have procedure which produces list of applied for jobs web page(using htp. package)
    I got result in cursor, but have to provide dinamic sort, based on colimn pressed
    procedure my_application_list
    (pi_resume_num     in varchar2 default null
    ,pi_sort_col     in varchar2 default null
    ,pi_page_no     in varchar2 default null
    ,pi_action     in varchar2 default null
    ,pi_msg          in varchar2 default null
    is
    CURSOR cur_job IS
         SELECT      jtl.JOB_TITLE
              ,jtl.COMPANY_NAME
              ,a.APPLY_DATE
              ,a.lang
              ,a.job_id
         FROM job_tl jtl, applied_for_job a, gateway gt
         WHERE a.job_seeker_id=app.job_Seeker
         AND a.job_id=jtl.job_id
         AND a.lang=jtl.lang
         AND a.gateway=gt.gateway
         AND jtl.lang=(SELECT substr(MIN(lt.order_list||jtl0.lang),2) lang
                   FROM      job_tl jtl0
                        ,language_tl lt
                   WHERE jtl0.job_id = a.job_id
                   AND jtl0.lang=lt.lang
                   AND lt.gui_lang=app.language)
         ORDER BY pi_sort_col
    rest of code
    The columns displayed in web page are Job_title, Company_name and Applied_date
    This page is displyed well, bu without column nmes at the top. I am trying to get column names from cursor in order to have ORDER BY <pi_sort_col>
    can someone help how i can get those column names:Job_title, Company_name and Applied_date
    User will be able to click on column and sort
    Thank in advance .I appreciate any help

    Hi Francisco
    Here is my code
    CREATE OR REPLACE PACKAGE BODY cc_web_application_list
    IS
    TYPE COL_NAME_LIST IS TABLE OF VARCHAR2(100)
         INDEX BY BINARY_INTEGER;
    TYPE COL_ORDER_LIST IS TABLE OF VARCHAR2(30)
         INDEX BY BINARY_INTEGER;
    col_name_t col_name_list;
    col_order_t col_order_list;
    procedure my_application_list
         (pi_resume_num     in varchar2 default null
         ,pi_sort_col     in varchar2 default null
         ,pi_page_no     in varchar2 default null
         ,pi_action     in varchar2 default null
         ,pi_msg          in varchar2 default null
    is
    l_my_page_no      PLS_INTEGER :=     TO_NUMBER(nvl(pi_page_no,1));
    l_js_name          gam_user.username%TYPE;
    l_js_first_name          gam_user.first_name%TYPE;
    l_cnt                PLS_INTEGER := 0;
    l_scr_lines      PLS_INTEGER := 0;
    l_curline           PLS_INTEGER;
    l_jobs_applied           PLS_INTEGER;
    l_total_rec      PLS_INTEGER;
    l_total_pages      PLS_INTEGER;
    l_pos               PLS_INTEGER;
    l_first               PLS_INTEGER :=0;
    last                PLS_INTEGER :=0;
    l_lines           PLS_INTEGER := 10;
    col_name      VARCHAR2(100) := col_name_t(3) ;
    col_order           VARCHAR2(30) := 'DESC';
    str                VARCHAR2(2000);
    TYPE display_rec IS TABLE OF VARCHAR2(500) INDEX BY BINARY_INTEGER;
    display           display_rec;
    TYPE page_table_type IS TABLE OF PLS_INTEGER INDEX BY BINARY_INTEGER;
    page_number          page_table_type;
    CURSOR cur_job IS
         SELECT      jtl.JOB_TITLE job_title
              ,jtl.COMPANY_NAME company_name
              ,a.APPLY_DATE apply_date
              ,a.lang
              ,a.job_id
         FROM job_tl jtl, applied_for_job a, gateway gt
         WHERE a.job_seeker_id=app.job_Seeker
         AND a.job_id=jtl.job_id
         AND a.lang=jtl.lang
         AND a.gateway=gt.gateway
         ORDER BY a.apply_date;
    This decode is a problem
              decode(col_order,'ASC'
                   ,decode(col_name
                   ,col_name_t(1), jtl.job_title
                   ,col_name_t(2), jtl.company_name
                   ,col_name_t(3), TO_CHAR(a.apply_date, 'YYYYMMDDhh24miss')
                   ,a.apply_date)
                   ) ASC
              ,decode(col_order,'DESC'
                   ,decode(col_name
                   ,col_name_t(1), jtl.job_title
                   ,col_name_t(2), jtl.company_name
                   ,col_name_t(3), TO_CHAR(a.apply_date, 'YYYYMMDDhh24miss')
                   ,a.apply_date)
                   ) DESC
              ,a.apply_date
    TYPE rec_one IS TABLE OF cur_job%ROWTYPE INDEX BY BINARY_INTEGER;
    r               rec_one;
    BEGIN
    BEGIN
    SELECT username,first_name
    INTO l_js_name,l_js_first_name
    FROM gam_user
    WHERE user_id = App.job_seeker;
    EXCEPTION
    WHEN OTHERS THEN NULL;
    END;
    Cc_Pkg_Elements.p_page_top_job_seeker(
    'Personal Job List'
    ,REPLACE(Txt_Proc_My_Joblist.title_job_list
         ,'##first_name##',l_js_first_name),'N' ,TRUE ,'Pxx');
    ----- get numer of records returned by query
    SELECT COUNT(1)
    INTO l_total_rec
    FROM     job_tl jtl,applied_for_job a
         ,gateway gt
    WHERE a.job_id = jtl.job_id
    AND     a.job_seeker_id     = App.job_seeker
    AND     a.gateway     = gt.gateway ;
    ------get number of pages
    l_total_pages:=CEIL (l_total_rec/l_lines);
    l_jobs_applied := 0;
    col_name := pi_sort_col;
    col_order := pi_sort_col;
    --get first positions
    l_first := (nvl(l_my_page_no,1) - 1) * l_lines + 1;
    FOR rec IN cur_job LOOP
         l_cnt := l_cnt + 1;
         EXIT WHEN l_cnt > l_first + l_lines - 1;
         IF l_cnt >= l_first THEN
              l_scr_lines := l_scr_lines + 1;      
              r(l_scr_lines) := rec;          --assign counter from loop to r index
              IF rec.apply_date IS NOT NULL THEN
              l_jobs_applied := l_jobs_applied + 1;
              END IF;
         END IF;
    END LOOP;
    htp.p('<FORM ACTION="'||App.gateway||'8.my_application_list" METHOD="post">');
    htp.p('<table align="center">');
    htp.p('<tr><td>');
    IF r.COUNT = 0 THEN
         Web_Pkg_Elements.doc_msg(Txt_Proc_My_Joblist.no_jobs);
    END IF;
    htp.p('</td></tr>');
    htp.p('</table>');
    --table_heading(col_name ,col_order );
    htp.p('<table align=center>');
    htp.p('<tr align="center"><td>');
    FOR i IN 1..l_total_pages LOOP
         page_number(i) := i;
         IF page_number(i) = l_total_pages THEN
              htp.p('');
    ||'');
              Web_Pkg_Elements.doc_val_small(page_number(i)||'</A>');          
         ELSE
         htp.p('');
    |'||'');
         Web_Pkg_Elements.doc_val_small(page_number(i)||' |'||'</A>');     
         END IF;
    END LOOP;
    htp.p('</td></tr>');
    htp.p('</table>');
    htp.p('<table align=center>');
    FOR l_curline IN 1..l_scr_lines LOOP
         display(1) := NVL(r(l_curline).job_title, '<br>');
         display(2) := NVL(r(l_curline).company_name, '<br>');
         display(3) := NVL(Cc_Pkg_Nls.date2char(r(l_curline).apply_date, App.date_format), '<br>');
         IF MOD(l_curline, 2) = 0 THEN     
              Cc_Pkg_Elements.tr_even;
         ELSE
              Cc_Pkg_Elements.tr_odd;
         END IF;
         htp.p('<td>');
         htp.p('');
         Web_Pkg_Elements.doc_val(display(1)||'');
         htp.p('</td>');
         htp.p('<td>');
         Web_Pkg_Elements.doc_val(display(2));
         htp.p('</td>');
         htp.p('     <td>');
         Web_Pkg_Elements.doc_val(display(3));
         htp.p('     </td>');
    htp.p('</tr>');
    END LOOP;
    htp.p('</TABLE>');
    htp.p('<TABLE width="88%" BORDER="0" CELLPADDING="0" CELLSPACING="0"
                   align="center">');
    htp.p('<tr valign=bottom>');
    htp.p('<TD colspan=2 align=right>');
    IF l_my_page_no > 1 THEN
         htp.p('<P>'||'<IMG SRC="'||App.image||'prev.gif" ALT="'
         ||Txt_Proc_My_Joblist.prev
         ||'"'     ||' HEIGHT=20 BORDER=0 ALIGN=bottom '
         ||'hspace=2>');
    END IF;
    IF l_my_page_no < CEIL (l_total_rec/l_lines) THEN
         htp.p(' <a href="'||
         web_pkg_elements.link$$(App.gateway||'8.my_application_list?'
         ||'pi_sort_col='||Web_Pkg_Elements.replace_in_url(pi_sort_col)
         ||'&pi_msg=&pi_page_no='||TO_CHAR(l_my_page_no + 1)
         ||">'||'<IMG SRC="'||App.image||'next.gif" ALT="'
         ||Txt_Proc_My_Joblist.NEXT
         ||'"' ||' HEIGHT=20 BORDER=0 ALIGN=bottom '
         ||'hspace=2></a>');
    END IF;
    htp.p('</TD>');
    htp.p('</TR>');
    htp.p('     </TABLE>');
    htp.formHidden('pi_sort_col', pi_sort_col);
    htp.formHidden('pi_page_no', pi_page_no);
    htp.p('</FORM>');
    END my_application_list;
    END ; --cc_pkg_application_list

  • SSIS 2012 error column name - SSISDB

    I need to get the column name for the error rows in a Data Flow Task.  I have looked at this:
    bennyaustin.wordpress.com/2011/02/04/ssis-name-of-errorcolumn/
    which requires this: dfld.codeplex com
    which requires "Fully qualified path of SSIS Package in File System.".
    Our packages aren't deployed to the file system. They are deployed to the Integration Services Catalog/SSISDB.
    What is the recommended method for retrieving the column name when a row is redirected due to an error?
    Thanks for your help,
    Suzanne

    Hi Suzanne,
    To get the column name based on the Lineage ID of the error column, we need to use the
    FindColumnByLineageID method in a Script Component or create a Custom Component.
    Now that the solution described in the blog you mentioned uses a third-party Custom Component, you can also refer to the following blog which provides the code to build such a Custom Component:
    http://naseermuhammed.wordpress.com/tips-tricks/getting-error-column-name-in-ssis/ 
    The demo in this blog is for SSIS 2012.
    Regards,
    Mike Yin
    TechNet Community Support

  • JTable - Help with column names and rowselection

    Hi,
    Is there anyone that can help me. I have successfully been able to load a JTable from an MS access database using vectors. I am now trying to find out how to hardcode the column names into the JTable as a string.
    Can anyone please also show me some code on how to be able update a value in a cell (from ''N'' to ''Y'') by double clicking on that row.
    How can I make all the other columns non-editable.
    Here is my code:
         private JTable getJTable() {
              Vector columnNames = new Vector();
    Vector data = new Vector();
    try
    // Connect to the Database
    String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    // String url = "jdbc:odbc:Teenergy"; // if using ODBC Data Source name
    String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Documents " +
              "and Settings/Administrator/My Documents/mdbTEST.mdb";
    String userid = "";
    String password = "";
    Class.forName( driver );
    Connection connection = DriverManager.getConnection( url, userid, password );
    // Read data from a table
    String sql = "select * from PurchaseOrderView";
    Statement stmt = connection.createStatement();
    ResultSet rs = stmt.executeQuery( sql );
    ResultSetMetaData md = rs.getMetaData();
    int columns = md.getColumnCount();
    // Get column names
    for (int i = 1; i <= columns; i++)
    columnNames.addElement( md.getColumnName(i) );
    // Get row data
    while (rs.next())
    Vector row = new Vector(columns);
    for (int i = 1; i <= columns; i++)
    row.addElement( rs.getObject(i) );
    data.addElement( row );
    rs.close();
    stmt.close();
    catch(Exception e)
    System.out.println( e );
              if (jTable == null) {
                   jTable = new JTable(data, columnNames);
                   jTable.setAutoCreateColumnsFromModel(false);
                   jTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_NEXT_COLUMN);
                   jTable.setShowHorizontalLines(false);
                   jTable.setGridColor(java.awt.SystemColor.control);
                   jTable.setRowSelectionAllowed(true);
                   jTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
                   jTable.setShowGrid(true);     
              return jTable;
         }

    this method has a default behavior to supply exactly what you're seeing: column names consisting of the capitalized letters, "A", "B", "C".Thanks Pete, had seen that but never really thought about it... about 10 days ago somebody needed to obtain Excel column names, I'd offered a rigorous solution and now see it would have been shorter and simpler (if a little heavier) to extend DefaultTableModel and provide the two additional methods needed (getOffsetCol and getColIndex).
    Not much of a difference in LOC but certainly more elegant ;-)
    Darryl

  • How do i change column names in oracle model?

    Hi,
    I am performing a migration from SQL SERVER 7.0 to Oracle 8.1.7.
    I have tables that have tables in SQL SERVER with column names
    that are "TYPE" and "BODY".(These are generally TEXT datatype
    columns that need to be converted to LONG in Oracle.We need
    these to be LONG datatype in Oracle because of an application we
    are using. LOBS cannot be allowed)
    The migration utility renames these columns as "TYPE_"
    and "BODY_" and creates the tables in the Oracle Database.
    I need to have these tables in Oracle with the same column names
    viz. "TYPE" and "BODY" .
    I can create new tables in Oracle with the column names "TYPE"
    and "BODY" but cannot change the options in the migration
    workbench for this.
    Is there any option or any workaround I can use to change the
    column names in the Oracle model?or set the options so that the
    Oracle model tables donot modify these column names?
    Thanks in advance for all the help.
    Mandar

    The words 'TYPE' and 'BODY' are reserved Oracle words. Its best
    to go along with what the workbench has suggested. If you have
    to keep the original names of the columns trying wrapping double
    quotes around them after the data migration is complete. This
    may cause a case sensitivity or referential problem later on
    though.

  • How to obtain the updated column name in a trigger?

    Hello everyone,
    I need to know for audit propose the updated column name in a After Update Trigger on a Table.
    The table have more than 20 columns, and i think that do more than 20 conditions asking for the difference between the :new value and the :old value is not the best way.
    Thanks for the help!
    LCJ

    Hi,
    Thanks to all for the replays.
    I didn't know that i can pass the column name to the UPDATING. This is only possible on 10g??
    Any way, i pass the column name and works fine, but i have another issue because of that.
    I obtain the column name from a cursor that query user_tab_columns view, when i try to obtain the value of the :old or :new, i can't because i don't know how to obtain the value of the value.
    This example show better:
    DECLARE
    vOldValue Varchar2(50);
    Cursor cur_Column_Names Is
    Select COLUMN_NAME
    From User_Tab_Columns
    Where TABLE_NAME = 'table_name';
    BEGIN
    For var_cursor In cur_Column_Names Loop
    If Updating(var_cursor.COLUMN_NAME) Then
    vOldValue := '?'; -- How obtain the value of the :old. + >var_cursor.COLUMN_NAME??
    End If;
    End Loop;
    END;Thanks to all for the help.
    LCJ

  • Power View Enhancement Request - Allow for columns to drop off PowerView when column name changes in data model instead of rendering the PowerView inaccessible

    Currently in PowerView, if a column name changes in the tabular model, and that column is being used in a PowerView chart, the PowerView will become inaccessible.
    It would be nice if it functioned similar to Pivot Table. If a column name changes for a column that is being used in a Pivot Table, the field is just removed from the chart, and the user can select the newly named column. 

    Hi plantm,
    After testing the issue in my environment, I can reproduce it. After we change a column name which is used in a Power View chart, Power view will render the message that” The external data connection has been disabled for this Power View report. Please enable
    the connection.” when we reopen the file.
    To fix this issue, we can click Refresh button under POWER VIEW menu, then it would prompt us that” Power View was not able to complete the action due to a query failure. This can happen if the structure of your data has changed, in which case closing and
    re-opening the application will resolve the problem.”
    According to the error message, we should try to reopen the file to fix this issue. Power view will render the message that” Please refresh to see the data for this Power View Sheet. You can set properties in the Connection Properties dialog so that the
    data refreshes automatically when you open the file.” when we reopen the file. Then we can refresh it again, the report will be displayed without that field.
    Based on my research, inherently what the message means is that Power View cannot be used as a tool for snapshot reporting. With an Excel PivotTable, we can see the data last saved in the PivotTable. Power View, however, does not behave the same way – it
    won’t render the last saved state. If we want to avoid this message when we reopen the file, there are two methods:
    When we create the Power View report, we can select the checkbox that “Refresh data when opening the file”.
    After it’s been set up, go to Connections on the Data menu, then choose Properties.
    For more details about the settings, we can refer to the following blog:
    http://www.sqlchick.com/entries/2013/3/30/creating-a-power-view-report-in-excel-2013-which-uses-an-ext.html
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Need help on getting the column names of Tabletype

    I have a table Mapping with the following values: This Mapping table contains the table names (in Tabname) and the column names(colname) of various tables and values(ValuesTobeFilled) for the columns.
    I have to insert into the tables present in the Tabname field with the values present in the ValuesTobeFilled in the columns present in the Colname field.
    Note: The Mapping table need not contain all the columns of the base table. The columns that are not present can be filled with null. And this mapping table is not fixed i.e. rows can be inserted/deleted frequently.
    Sample values in mapping table:
    Tabname                        Colname        ValuesTobeFilled
    sample_items     Eno     Corresponding Expression to get the values from XML input
    sample_items     Ename     Corresponding Expression to get the values from XML input
    XXX     YYY     Corresponding Expression to get the values from XML input
    Before filling in the actual tables, I have to store the entire data temporarily and I have used a tabletype declared as follows:
    TYPE T_sample_items IS TABLE OF sample_items%ROWTYPE INDEX BY BINARY_INTEGER;
    l_sample_items T_sample_items;
    Where the table sample_items have the following columns:
    •     Eno
    •     Ename
    •     Eaddress
    •     Eemail
    So, the tabletype should be filled as:
    Eno     Ename     Eaddress     EEmail
    1     XXX     -     -
    I have declared a cursor to select the values from mapping table and I need to fill in the ValuesTobeFilled values to the corresponding table.
    CURSOR c_xpath (c_tname mapping.TABNAME%type)
    IS
    select * from mapping where tabname = c_tname;
    CURSOR c_tables
    IS
    SELECT DISTINCT TABNAME FROM mapping;
    FOR crsr IN c_tables
    LOOP
    p_tname := CRSR.TABNAME;
    FOR csr IN c_xpath(p_tname)
    LOOP
    IF l_xml_doc.EXISTSNODE(CSR.XPATH_EXP) = 1
    THEN
    l_node_value := l_xml_doc.extract(CSR.XPATH_EXP).getStringVal(); -- This is the value to be stored in the corresponding column
    ELSE
         l_node_value := NULL;
    END IF;
    IF CSR.COLUMN_NAME = ‘eno’
    THEN
         l_sample_items(1).eno := l_node_value;
    ELSIF CSR.COLUMN_NAME = ‘ename’
    THEN
         l_sample_items(1).name := l_node_value;
    END IF;
    END LOOP;
    END LOOP;      
    And I need to eliminate hard coding while comparing the column names (in the following piece of code) as the Mapping table values are subject to insertion/deletion:
    IF CSR.COLUMN_NAME = ‘eno’
    THEN
         l_sample_items(1).eno := l_node_value;
    ELSIF CSR.COLUMN_NAME = ‘ename’
    THEN
         l_sample_items(1).ename := l_node_value;
    END IF;
    I need to insert the values directly into the tabletype without this hardcoding. Please suggest me ways to compare the mapping table values with the field (column) names of the tabletype. If it is not possible using tabletype, please suggest any other ways of fixing the problem.
    Many thanks,
    Gopi

    I take it this isn't going to be a serious production system at the end of the day?
    Storing metadata in tables for extraction and insertion of data is just wrong in so many ways. It smells heavily of Entity Attribute Value modelling, which is the most wrong way to use a relational database and is known to have major performance implications and be liable to bugs and issues. The idea that EAV modelling allows for 'generic' databases where new data items can be added flexibly later on without having to change code is usually justified with an excuse of "it means we don't have to update all our tables when we want a new column" which is easily countered with "if you're adding a single column a good relational design wouldn't require you to add it to more than one table anyway in most cases".
    Just what exactly are you trying to do and why? There has to be a better way.

Maybe you are looking for

  • Can multiple apple IDs share the same library on the same computer?

    We have four devices using the same apple ID. Kind makes same time and messaging all messed up.  So I want to create a separate ID for my wife for her devices, but use the same library and applications. Is that possible?

  • AS3 Unloading external SWF piling up problem

    I have two buttons on main SWF what loads and Unload two external SWFs back and forth. Also one timer function is calling external Screen saver SWF and unload the existing one when no interaction found. I am using unloadAndStop() function to unload t

  • Why is everything larger?

    I used my Macbook with a video projector using a dvi to vga cable and it worked perfectly fine...The problem is that now evrything on my screen is super wide...The 1st time I plugged the projector in it did that, but then the screen went back to norm

  • What happened to 1280 X 800

    I recently upgraded from keynote '06 to '08 '06 had in the theme chooser the 1280 by 800 size which is my screens size (MacBook). what happened to it??? I know that there is a way to change the size later but that is really annoying, is there a way t

  • How to 'shade' Conky?

    Hello all, I am configuring Conky and have a little problem: Conky doesn't show up well on most of my wallpapers. I have it transparent, but was wondering if there is a way to shade it a bit? Basically I want the same effect that '-sh 25' in rxvt-uni