Oracle Database Testing Challenge - Compare Schema Data

前端 未结 2 1540
一生所求
一生所求 2021-01-16 11:12

Wondering if someone can help point me in the right direction with this challenge, or tell me I\'m crazy for trying this via sql. If sql would be too challenging, are there

2条回答
  •  耶瑟儿~
    2021-01-16 11:56

    First - check out this: http://docs.oracle.com/cd/E11882_01/server.112/e41481/spa_upgrade.htm#RATUG210

    Second - you would like to write a query that issues a query - The problem is that in user_tab_columns each column is a row. for doing that I would recommend you reading this : http://www.dba-oracle.com/t_converting_rows_columns.htm
    The source table for you is USER_TAB_COLUMNS, and when running the query you can add a where that says "where column_name not like 'ETL%' etc. After that - the query would look something like:
    select 'select '

     || listagg..... (from the link) || 'from table name' sql 
    from user_tab_columns
    where column_name not like 'ETL%'
    and table_name = 'table name'
    group by table_name
    

    and btw - you're not crazy - before changing a system you need to be able to sign the upgrade will succeed - this is the only way to do it.

    btw - if you'll describe in more depth the system and the upgrade - I'm sure the community will be able to help you find ways to test it in more depth, and will point you out to things to test.
    Testing only the output is not enough in many cases....

    GOOD LUCK!

提交回复
热议问题