Trouble with the SQL smt to :list tables having more than 1000 rows

Please I trying to list only tables having more than 1000 rows, but the sql stmt below doesn't work, can someone gives me a tips
select table_name from user_tables where table_name in ( select table_name from user_tables where rownum > 1000 ) : The result is no rows!
But I know that I have at lest 50 tables having more than 1000 rows
Thanks a lot for the help

If your tables are reasonably analyzed, then you can simply query:
SELECT table_name,
       num_rows
  FROM user_tables
WHERE num_rows >= 1000This will give you quite a reasonable estimate.
Otherwise you have to go for dynamic sql or use the data dictionary to help you generate suitable scripts ....

Similar Messages

  • Can i  create IN/UP/DE Trigger on a existing table having more than 2L rows

    Hi All,
    Can i create a INSERT/UPDATE/DELETE Trigger on a existing table having more than 2 lacs records ? if yes (is that works for only some kind of triggers? or for all ?). if not, tell me the reasons and limitations with guidelines.
    Thanks in Advance.

    Hi,
    Sure; you can create new triggers for tables that already have rows. The type of trigger and the number of rows already in the table don't matter.
    Try it. If the trigger works with a small table in your Development database, then there's no reason to expect it won't work on a larger table in your Production datbase.

  • Logical table having more than one Logical table sources

    Hi ,
    Is it possible a logical table has 2 logical table sources and there is no join between the underlying table of logical table sources?
    What will happen if we create the request which contains one attribute from each source?
    Will BI server return records with Cartesian join?
    Is it mandatory if logical table is having more than one logical table sources(exp. Logical table sources are X,Y and underlying table is A,B respectively),
    The underlying tables (A&B) must be joined ?
    Can someone explain the logic behind the logical table sources? How does it work?
    Any reference of document will be appreciable.
    Thanks,Ashish

    Hi Stijn,
    Thanks for response.
    You are saying that Oracle BI server will run a query against both tables and combine the results. But if there is no possibilty of any type of join, how BI server will combine the results from both tables.
    I have a scenario like below -
    Suppose i have 2 tables A and B at physical layer. Both table contains the information of any common subject area.
    But there is no attribute is common between A and B so not any kind of join possible between two.
    Now if i create a logical table with 2 logical table source A and B and create any request having one column from A and one from B ,
    What will happen? How BI server will combine the result? Will BI server not result records after Cartesian join.
    How can i model this scenario?

  • Interactive alv report......with one table having more than 2 foreign key

    *& Report  ZRAHUL_ALV_SFLIGHT2
    REPORT  zrahul_alv_sflight2 NO STANDARD PAGE HEADING.
    TYPE-POOLS slis.
    DATA: fcat TYPE slis_fieldcat_alv,
          it_fcat TYPE slis_t_fieldcat_alv,
          fcat1 TYPE slis_fieldcat_alv,
          it_fcat1 TYPE slis_t_fieldcat_alv,
          fcat2 TYPE slis_fieldcat_alv,
          it_fcat2 TYPE slis_t_fieldcat_alv,
          lout TYPE slis_layout_alv,
          head TYPE slis_listheader,
          it_head TYPE slis_t_listheader.
    TABLES: SFLIGHT, SCURX, SAPLANE.
    DATA: BEGIN OF it_sflight OCCURS 0,
            carrid TYPE sflight-carrid,      "PK
            connid TYPE sflight-connid,
            fldate TYPE sflight-fldate,
            currency TYPE sflight-currency,        "FK 1
            planetype TYPE sflight-planetype,      "FK 2
          END OF it_sflight.
    DATA: BEGIN OF it_scurx OCCURS 0,
            currkey TYPE scurx-currkey,        "PK 1
            currdec TYPE scurx-currdec,
          END OF it_scurx.
    DATA: BEGIN OF it_saplane OCCURS 0,
            planetype TYPE saplane-planetype,      "PK 2
            seatsmax TYPE saplane-seatsmax,
            tankcap TYPE saplane-tankcap,
            weight TYPE saplane-weight,
          END OF it_saplane.
    SELECTION-SCREEN: BEGIN OF BLOCK blk WITH FRAME TITLE t.
    SELECT-OPTIONS: id FOR it_sflight-carrid,
                    id2 FOR it_sflight-connid.
    SELECTION-SCREEN END OF BLOCK blk.
    INITIALIZATION.
      t = 'enter required criterias'.
      lout-zebra = 'X'.
    START-OF-SELECTION.
      SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE it_sflight
                WHERE carrid IN id AND connid IN id2.
    END-OF-SELECTION.
    ****FCAT F0R IT_SFLIGHT
      fcat-col_pos = 1.
      fcat-tabname = 'IT_SFLIGHT'.
      fcat-fieldname = 'CARRID'.
      fcat-outputlen = 10.
      fcat-seltext_m = 'PLANE ID'.
      APPEND fcat TO it_fcat.
      CLEAR fcat.
      fcat-col_pos = 2.
      fcat-tabname = 'IT_SFLIGHT'.
      fcat-fieldname = 'CONNID'.
      fcat-outputlen = 10.
      fcat-seltext_m = 'CONN ID'.
      APPEND fcat TO it_fcat.
      CLEAR fcat.
      fcat-col_pos = 3.
      fcat-tabname = 'IT_SFLIGHT'.
      fcat-fieldname = 'FLDATE'.
      fcat-outputlen = 10.
      fcat-seltext_m = 'FLDATE'.
      APPEND fcat TO it_fcat.
      CLEAR fcat.
      fcat-col_pos = 4.
      fcat-tabname = 'IT_SFLIGHT'.
      fcat-fieldname = 'CURRENCY'.
      fcat-outputlen = 10.
      fcat-seltext_m = 'CURRENCY'.
      APPEND fcat TO it_fcat.
      CLEAR fcat.
      fcat-col_pos = 5.
      fcat-tabname = 'IT_SFLIGHT'.
      fcat-fieldname = ';PLANETYPE'.
      fcat-outputlen = 10.
      fcat-seltext_m = 'PLANETYPE'.
      APPEND fcat TO it_fcat.
      CLEAR fcat.
    *****GRID DISPLAY
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK                 = ' '
        I_BYPASSING_BUFFER                = ' '
        I_BUFFER_ACTIVE                   = ' '
        i_callback_program                = 'ZRAHUL_ALV_SFLIGHT2'
        I_CALLBACK_PF_STATUS_SET          = ' '
         i_callback_user_command           = 'CLICK'
         i_callback_top_of_page            = 'HEADER'
        I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
        I_CALLBACK_HTML_END_OF_LIST       = ' '
        I_STRUCTURE_NAME                  =
        I_BACKGROUND_ID                   = ' '
         i_grid_title                      = 'GRID 1'
        I_GRID_SETTINGS                   =
         is_layout                         = lout
         it_fieldcat                       = it_fcat
        IT_EXCLUDING                      =
        IT_SPECIAL_GROUPS                 =
        IT_SORT                           =
        IT_FILTER                         =
        IS_SEL_HIDE                       =
        I_DEFAULT                         = 'X'
        I_SAVE                            = ' '
        IS_VARIANT                        =
        IT_EVENTS                         =
        IT_EVENT_EXIT                     =
        IS_PRINT                          =
        IS_REPREP_ID                      =
        I_SCREEN_START_COLUMN             = 0
        I_SCREEN_START_LINE               = 0
        I_SCREEN_END_COLUMN               = 0
        I_SCREEN_END_LINE                 = 0
        I_HTML_HEIGHT_TOP                 = 0
        I_HTML_HEIGHT_END                 = 0
        IT_ALV_GRAPHICS                   =
        IT_HYPERLINK                      =
        IT_ADD_FIELDCAT                   =
        IT_EXCEPT_QINFO                   =
        IR_SALV_FULLSCREEN_ADAPTER        =
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER           =
        ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = it_sflight
      EXCEPTIONS
        PROGRAM_ERROR                     = 1
        OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *&      Form  header
          text
    FORM header.
      CLEAR it_head.
      head-typ = 'H'.
      head-info = 'KINGFISHER'.
      APPEND head TO it_head.
      head-typ = 'S'.
      head-key = 'KEY'.
      head-info = 'AIRLINES'.
      APPEND head TO it_head.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = it_head
         i_logo                   = 'KING_LOGO'
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.                    "header
    *&      Form  CLICK
          text
         -->OK         text
         -->SEL        text
    FORM click USING ok TYPE sy-ucomm
                     sel TYPE slis_selfield.
      CLEAR it_fcat.
      CASE ok.
        WHEN '&IC1'.
    ********SAPLANE RELATION
          READ TABLE it_sflight INDEX sel-tabindex.
          SELECT * FROM saplane INTO CORRESPONDING FIELDS OF TABLE it_saplane WHERE planetype = it_sflight-planetype.
          fcat-col_pos = 1.
          fcat-tabname = 'IT_SAPLANE'.
          fcat-fieldname = 'PLANETYPE'.
          fcat-outputlen = 10.
          fcat-seltext_m = 'TYPE OF PLANE'.
          APPEND fcat TO it_FCAT.
          CLEAR fcat.
          fcat-col_pos = 2.
          fcat-tabname = 'IT_SAPLANE'.
          fcat-fieldname = 'SEATSMAX'.
          fcat-outputlen = 10.
          fcat-seltext_m = 'MAX SEATS'.
          APPEND fcat TO it_FCAT.
          CLEAR fcat.
          fcat-col_pos = 3.
          fcat-tabname = 'IT_SAPLANE'.
          fcat-fieldname = 'TANKCAP'.
          fcat-outputlen = 10.
          fcat-seltext_m = 'FUEL TANK CAPACITY'.
          APPEND fcat TO it_FCAT.
          CLEAR fcat.
          fcat-col_pos = 4.
          fcat-tabname = 'IT_SAPLANE'.
          fcat-fieldname = 'WEIGHT'.
          fcat-outputlen = 10.
          fcat-seltext_m = 'WEIGHT F PLANE'.
          APPEND fcat TO it_FCAT.
          CLEAR fcat.
          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
             i_callback_program                = 'ZRAHUL_ALV_SFLIGHT2'
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
             i_callback_top_of_page            = 'HEADER'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
             i_grid_title                      = 'GRID 2'
      I_GRID_SETTINGS                   =
             is_layout                         = LOUT
             it_fieldcat                       = IT_FCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
            tables
              t_outtab                          = IT_SAPLANE
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *******SCURX RELATION
                    CLEAR: IT_FCAT2,IT_FCAT.
                    READ TABLE IT_SFLIGHT INDEX SEL-TABINDEX.
                      SELECT * FROM SCURX INTO CORRESPONDING FIELDS OF TABLE IT_SCURX WHERE CURRKEY = IT_SFLIGHT-CURRENCY.
                      FCAT2-COL_POS = 1.
                      FCAT2-TABNAME = 'IT_SCURX'.
                      FCAT2-FIELDNAME = 'CURRKEY'.
                      FCAT2-OUTPUTLEN = 15.
                      FCAT2-SELTEXT_M = 'CURRENCY'.
                      APPEND FCAT2 TO IT_FCAT2.
                      CLEAR FCAT2.
                      FCAT2-COL_POS = 2.
                      FCAT2-TABNAME = 'IT_SCURX'.
                      FCAT2-FIELDNAME = 'CURRDEC'.
                      FCAT2-OUTPUTLEN = 15.
                      FCAT2-SELTEXT_M = 'CURRENCY DEC'.
                      APPEND FCAT2 TO IT_FCAT2.
                      CLEAR FCAT2.
                      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
                       EXPORTING
                        I_INTERFACE_CHECK                 = ' '
                        I_BYPASSING_BUFFER                = ' '
                        I_BUFFER_ACTIVE                   = ' '
                         I_CALLBACK_PROGRAM                = 'ZRAHUL_ALV_SFLIGHT2'
                        I_CALLBACK_PF_STATUS_SET          = ' '
                        I_CALLBACK_USER_COMMAND           = ' '
                         I_CALLBACK_TOP_OF_PAGE            = 'HEADER'
                        I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
                        I_CALLBACK_HTML_END_OF_LIST       = ' '
                        I_STRUCTURE_NAME                  =
                        I_BACKGROUND_ID                   = ' '
                         I_GRID_TITLE                      = 'GRID 3'
                        I_GRID_SETTINGS                   =
                         IS_LAYOUT                         = LOUT
                         IT_FIELDCAT                       = IT_FCAT2
                        IT_EXCLUDING                      =
                        IT_SPECIAL_GROUPS                 =
                        IT_SORT                           =
                        IT_FILTER                         =
                        IS_SEL_HIDE                       =
                        I_DEFAULT                         = 'X'
                        I_SAVE                            = ' '
                        IS_VARIANT                        =
                        IT_EVENTS                         =
                        IT_EVENT_EXIT                     =
                        IS_PRINT                          =
                        IS_REPREP_ID                      =
                        I_SCREEN_START_COLUMN             = 0
                        I_SCREEN_START_LINE               = 0
                        I_SCREEN_END_COLUMN               = 0
                        I_SCREEN_END_LINE                 = 0
                        I_HTML_HEIGHT_TOP                 = 0
                        I_HTML_HEIGHT_END                 = 0
                        IT_ALV_GRAPHICS                   =
                        IT_HYPERLINK                      =
                        IT_ADD_FIELDCAT                   =
                        IT_EXCEPT_QINFO                   =
                        IR_SALV_FULLSCREEN_ADAPTER        =
                      IMPORTING
                        E_EXIT_CAUSED_BY_CALLER           =
                        ES_EXIT_CAUSED_BY_USER            =
                        TABLES
                          t_outtab                          = IT_SCURX
                      EXCEPTIONS
                        PROGRAM_ERROR                     = 1
                        OTHERS                            = 2
                      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                      ENDIF.
      ENDCASE.
    ENDFORM.                    "click
    this program runs fine when one navigation is used......but when both the foreign keys come in picture then its shows sequencialy...cant we jump directly to the third one which i require....
    plz guide me.thank u.

    in short i want help on table having multiple foreign keys....and how to navigate in this when working on ALV reports.....
    its easy when using interactive reports by using sy-cucol and sy-curow.....
    reply asap.
    thank u in advance.

  • SQL select query having more than 1000 values in 'IN' clause of predicate.

    Hi,
    We are executing a select query from a table and showing it through a front end screen. When the count of values given in the 'IN' clause of predicate are exceeding 1000 , it is throwing error.
    eg. select * from Employees where emp.Id. in('111',123','121','3232',........1001 Ids)
    We are using Oracle version 10.2.0.
    Please suggest how to tackle such issue.
    Regards,
    Naveen Kumar.C.
    Edited by: Naveen Kumar C on Aug 30, 2008 10:01 PM

    Use a nested table:
    create or replace type numbertype
    as object
    (nr number(20,10) )
    create or replace type number_table
    as table of numbertype
    create or replace procedure tableselect
    ( p_numbers in number_table
    , p_ref_result out sys_refcursor)
    is
    begin
    open p_ref_result for
         select *
    {noformat}     from   employees
         ,        (select /*+ cardinality(tab 10) */ tab.nr
                   from   table(p_numbers) tab) tbnrs
         where id = tbnrs.nr;
    end;
    /{noformat}
    Using nested tables will reduce the amount of parsing because the sql statement uses binded variables! The cardinality hint causes Oracle to use the index on employees.id.

  • HT3775 Isn't Quicktime the most annoying media player? Seriously, more than 1000 dlls in each of my two macs and neither of them can play my avi videos with this, so frustrated... Am I the only one?

    The thing is, I cant play my avi videos in Quicktime because it ask me for some codec, not saying which one in specific... I have a Macbook air mid 2011 and a macbook pro and same issue, I'm using better VLC to play videos, but why the native apple software cant play my content which, by the way, windows 7 devices plays without issues. Maybe this question is not enough to open a new post, but somehow we need to make noise, is not possible that we left apple being so unrespectful with us after all the money we expend in their products... What do you think?

    AVI was invented by Microsoft over twenty years ago. They abandoned it in favor of more modern WMP formats.
    As you've found out not all AVI's work the same way on different OS's or devices. VLC can play many more formats (out of the box) than the standard QuickTime Player but a bit of searching will lead you to components that assit QuickTime.
    http://perian.org

  • Nested Table having more than 1 column comparison using ORACLE MULTISET

    Dear ALL,
    I am using ORACLE 10gR2 Database.
    I am currently trying to compare two sets of data that I get from two queries in PL/SQL. I want to use Oracle MULTISET UNION, MULTISET INTERSECT, MULTISET EXCEP for those operations.
    But When I am executing the below given code I am getting the error.
    PLS-00306: wrong number or types of arguments in call to 'MULTISET_EXCEPT_ALL'
    My Code
    declare
    type wh_unique_record is record (cpy_key number(22),cnc_id varchar2(22),cust_type_id number,
    device_info_id number,scope_id number,excep_id number,
    config_date date);
    type wh_previous_data_table is table of wh_unique_record;
    wh_previous_data wh_previous_data_table;
    wh_current_data wh_previous_data_table;
    wh_union_data wh_previous_data_table;
    wh_intersect_data wh_previous_data_table;
    -- This cursor I am using to populate the data into the nested tables
    cursor c_previous_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
    from r_cfg_wh_excep
    where cpy_key=17278
    and trunc(config_date)=trunc(to_date('06-jul-2009','dd-mon-yyyy'));
    cursor c_current_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
    from r_cfg_wh_excep
    where cpy_key=17278
    and trunc(config_date)=trunc(to_date('16-jul-2009','dd-mon-yyyy'));
    begin
    open c_previous_data;
    fetch c_previous_data bulk collect into wh_previous_data;
    close c_previous_data;
    open c_current_data;
    fetch c_current_data bulk collect into wh_current_data;
    close c_current_data;
    dbms_output.put_line('Previous count '||wh_previous_data.count);
    dbms_output.put_line('Current count '||wh_current_data.count);
    --FYI: MULTISET UNION IS WORKING.*
    wh_union_data := wh_current_data multiset union wh_previous_data;
    dbms_output.put_line('New count '||wh_union_data.count);
    wh_intersect_data:=wh_current_data MULTISET EXCEPT  wh_previous_data;
    dbms_output.put_line('The records that are repeating are  '||wh_intersect_data.count);
    end;
    Previous count 74062
    Current count 74508
    New count 148570
    PL/SQL procedure successfully completed.
    FYI: If I comment the MULTISET EXCEPT conditin then I am getting the output for MULTISET UNION.
    IS THERE ANY WAY ORACLE IS PROVIDING A FUNCTIONALITY WHERE WE CAN HAVE A NESTED TABLE WITH MULTIPLE COLUMNS AND THAT CAN BE USED IN PL/SQL AND USE BULK OPERATION TO POPULATE THE NESTED TABLE WITH MULTIPLE COLUMNS AND USE THE SAME IN MULTISET EXCEPT, MULTISET EXCEPT ETC.
    Appreciate your help on this.
    Thanks,
    Madhu K.

    Madhu,
    I am totally amazed. I didn't think any of the MULTISET operations would work with NTs of records. Lucky you!
    As for the EXCEPT, well, clearly it is a restriction or bug in PL/SQL.
    You may want to report it to Oracle Support.
    Regards,SF
    At 11:45 AM 10/1/2009, you wrote:
    Dear Steven,
    I am using ORACLE 10gR2 Database.
    I am currently trying to compare two sets of data that I get from two queries in PL/SQL. I want to use Oracle MULTISET UNION, MULTISET INTERSECT, MULTISET EXCEP for those operations.
    But When I am executing the below given code I am getting the error.
    PLS-00306: wrong number or types of arguments in call to 'MULTISET_EXCEPT_ALL'
    My Code
    declare
    type wh_unique_record is record (cpy_key number(22),cnc_id varchar2(22),cust_type_id number,
    device_info_id number,scope_id number,excep_id number,
    config_date date);
    type wh_previous_data_table is table of wh_unique_record;
    wh_previous_data wh_previous_data_table;
    wh_current_data wh_previous_data_table;
    wh_union_data wh_previous_data_table;
    wh_intersect_data wh_previous_data_table;
    -- This cursor I am using to populate the data into the nested tables
    cursor c_previous_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
    from r_cfg_wh_excep
    where cpy_key=17278
    and trunc(config_date)=trunc(to_date('06-jul-2009','dd-mon-yyyy'));
    cursor c_current_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
    from r_cfg_wh_excep
    where cpy_key=17278
    and trunc(config_date)=trunc(to_date('16-jul-2009','dd-mon-yyyy'));
    begin
    open c_previous_data;
    fetch c_previous_data bulk collect into wh_previous_data;
    close c_previous_data;
    open c_current_data;
    fetch c_current_data bulk collect into wh_current_data;
    close c_current_data;
    dbms_output.put_line('Previous count '||wh_previous_data.count);
    dbms_output.put_line('Current count '||wh_current_data.count);
    --FYI: MULTISET UNION IS WORKING.
    wh_union_data := wh_current_data multiset union wh_previous_data;
    dbms_output.put_line('New count '||wh_union_data.count);
    wh_intersect_data:=wh_current_data MULTISET EXCEPT wh_previous_data;
    dbms_output.put_line('The records that are repeating are '||wh_intersect_data.count);
    end;
    Previous count 74062
    Current count 74508
    New count 148570
    PL/SQL procedure successfully completed.
    FYI: If I comment the MULTISET EXCEPT conditin then I am getting the output for MULTISET UNION.
    IS THERE ANY WAY ORACLE IS PROVIDING A FUNCTIONALITY WHERE WE CAN HAVE A NESTED TABLE WITH MULTIPLE COLUMNS AND THAT CAN BE USED IN PL/SQL AND USE BULK OPERATION TO POPULATE THE NESTED TABLE WITH MULTIPLE COLUMNS AND USE THE SAME IN MULTISET EXCEPT, MULTISET EXCEPT ETC.
    Appreciate your help on this.
    Thanks,
    Madhu K.

  • Trigger to insert unique data into other table (having more than 40 millions of records) - MYSQL

    Hi All,
    i am facing impact of trigger in MYSQL, scenario is this:
    I am Having one table with duplicate records that is consist of (eid,tin,status and some other columns are also there but i need only these three).  there is another table which is having same these three columns (eid, tin, status).
    eid and tin will be same for given combination only status will be different i.e.
    1245 23 0
    1245 23 1
    1245 23 5
    1233 33 3
    1211 24 2
    1211 24 5
    so as per above example i have to feed data into other table as
    1245 23 0
    1233 33 3
    1211 24 5
    priority of status is like 0 will be inserted if that is present in record otherwise it will be decrease from 5 to 1.
    so i have designed trigger for this which will insert data after reading each row, but it is taking around 6.5 minutes for inserting 300000 records. so is there any other way to improve performance  for this mysql program.
    DELIMITER $$
    CREATE
        /*[DEFINER = { user | CURRENT_USER }]*/
        TRIGGER `kyr_log`.`upd_status` AFTER INSERT
        ON `kyr_log`.`kyrlog_bup`
        FOR EACH ROW
        BEGIN
    DECLARE v_eid VARCHAR(28);
    DECLARE v_status INT(11);
    SELECT kyrl_eid,kyrl_status INTO v_eid,v_status FROM kyrlog_bup ORDER BY kyrl_id DESC LIMIT 1;
       IF v_eid NOT IN (SELECT kyrl_eid FROM update_status.new_status) THEN
    INSERT INTO update_status.new_status(kyrl_eid,kyrl_tin,kyrl_status)
    SELECT kyrl_eid,kyrl_tin,kyrl_status FROM kyrlog_bup ORDER BY kyrl_id DESC LIMIT 1;
       ELSE IF v_status=2 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
              UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;
    END IF;
       ELSE IF v_status=3 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
              UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;  
    END IF;
       ELSE IF v_status=4 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
               UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid; 
    END IF;
       ELSE IF v_status=5 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
               UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;
    END IF;
               ELSE IF v_status=0 THEN
    UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;            
              END IF;
           END IF;
           END IF;
           END IF;
           END IF;
           END IF;
        END;
    $$
    DELIMITER ;
    please suggest me if there is  possibility of any other solution.
    thanks

    actually you didn't have seen discussion on this link , there are many discussion related to MYSQL . and mysql is owned by oracle. so i post it here.
    thanks for suggestion

  • Hi anyone please help .. i am facing issue with acrobat 11 pro version, in acrobat 7  we are able to compare 2 pdfs which are having more than 1000 pages but in acrobat 111 pro it not possible , if try do so acrobat will unresponsive.. please let me know

    please let me know how can resolve this issue... how can i compare 2 pdfs which are having more than 1000 pages.
    Acrobat

    please let me know how can resolve this issue... how can i compare 2 pdfs which are having more than 1000 pages.
    Acrobat

  • How to delete the double records connected to one or more than one tables in SQL 2008?

    Hi
    Can anyone please help me with the SQL query. I Im having a table called People with columns names: personno., lastname, firstname and so on. The personno. is having duplicate records,so all the duplicate records i have written with "double" in
    the beginning of the numbers. I tried deleting these double records but they are linked to one or more than one tables. I have to find out, all the tables blocking the deleting of double person. And then create select statements which creates update statements
    in order to replace the current id of double person with substitute id. (The personno. is in the form of id's in the database)
    Thanks

    You should not append "double" in the personno. When we append it will not be able to join or relate to other table. Keep the id as it is and use another field(STATUS) to mark as duplicate. Also we will require another field(PRIMARYID) against
    those duplicate rows i.e the main or the primary personno.
    SELECT * FROM OtherTable a INNER JOIN
    (SELECT personno, status, primaryid FROM PEOPLE WHERE status = 'Duplicate') b
    ON a.personno = b.personno
    UPDATE OtherTable SET personno = b.primaryid
    FROM OtherTable a INNER JOIN
    (SELECT personno, status, primaryid FROM PEOPLE WHERE status = 'Duplicate') b
    ON a.personno = b.personno
    NOTE: Please take backup before applying the query. This is not tested.
    Regards, RSingh

  • Vector or ArrayList  use for dropdown with more than 1000 entries

    Hi Friends
    I am having more than 1000 entries of different TimeZone's which i need to display in a dropdown list.
    i am not able to decide whether i need to use a Vector or Arraylist for storing these values.
    please let me know which one will be best suited to use in case the list entry is more than 1000 characters.
    waiting for a positive reply from your side.
    Thanks & Regards
    Vikeng

    A JComboBox can be constructed from a Vector (rather than any other sort of List) without having to implement your own ComboBoxModel. (JList is similar).
    I agree with kajbj - a control like this with a thousand entries is rather poor interface design. One exception might be if the entries are sorted in some way, and you "jump" to the appropriate place in the list as the user types.

  • Difference of the results more than 1000

    I have to write a procedure where if the results of the following result set varies by more than 1000 than it should sent out a paramter YES
    COUNT(1)     TABLE_NM
    42986     A_TBL
    539     B_TBL
    42986     C_TBL
    42986     AD_TBL
    so if the difference between the counts of any tables is more than 1000 then it should send YES.
    can someone suggest?

    SQL> create table tbl
      2    as
      3      select 42986 cnt,'A_TBL' table_nm from dual union all
      4      select 539,'B_TBL' from dual union all
      5      select 42986,'C_TBL' from dual union all
      6      select 42986,'D_TBL' from dual
      7  /
    Table created.
    SQL> select  case count(*)
      2            when 0 then 'NO'
      3            else 'YES'
      4          end result
      5    from  tbl t1,
      6          tbl t2
      7    where t2.cnt - t1.cnt > 1000
      8      and rownum = 1
      9  /
    RES
    YES
    SQL> drop table tbl
      2  /
    Table dropped.
    SQL> create table tbl
      2    as
      3      select 42986 cnt,'A_TBL' table_nm from dual union all
      4      select 42980,'B_TBL' from dual union all
      5      select 42950,'C_TBL' from dual union all
      6      select 42970,'D_TBL' from dual
      7  /
    Table created.
    SQL> select  case count(*)
      2            when 0 then 'NO'
      3            else 'YES'
      4          end result
      5    from  tbl t1,
      6          tbl t2
      7    where t2.cnt - t1.cnt > 1000
      8      and rownum = 1
      9  /
    RES
    NO
    SQL> SY.

  • Create pagination for table contain more than 2 PK

    Guys;
    Is there any way to use the wizard for creating FORM PAGINATION for tables having more than 2 PK??
    Regards;

    Hi dimitri;
    after the user login & start using this form thiswhat should happen to these 3 PKs:
    -1st PK will be a unique number for the questions.
    -2nd PK should be the ID for each survey ( created as global variable in Zero Page ).
    -3rd PK will be the division for this user (also created as a global variable in ZERO PAGE)..so this is the only field which will nt be changed while the user is logged..
    i tried to use the 1st 2 PKs...& set the last one to get a default value..it worked in the begining but gave me the 1st record for each Survey but my problem that i couldnt navigate to the 2nd record..& after that once i log out & relogin it willnt give me anything.
    Regards;
    ehammad

  • I am having trouble with the reminders app for iPad mini on iOS 7. When I. hit add list it doesn't add a list. I've tried everything. Thank you.

    I am having trouble with the reminders app for iPad mini on iOS 7. When I. hit add list it doesn't add a list. I've tried everything. Thank you.

    Device not recognized by iTune
    http://support.apple.com/kb/TS1591

  • Execute the sql statement stored in table

    friends i m in complication that, how can i execute sql statement which is stored in database table.
    how can i fetch that particular statement from table and make it execute!!!
    Thanks in advance

    I think we should stop at this point and have a little think.
    My understanding is that your plan is to do the following
    -Execute a Dynamic SQL statement which is constructed from values in several columns in a table (Bad idea to begin with)
    -The result of the execution is then loaded into PL/SQL.....not sure how you are handling different column lists but I'll assume you are not having to convert every column value to a VARCHAR2
    -The values returned are then used in an INSERT statement
    So basically your goal here is to take some data from one table and insert it into another table by moving data from SQL to PL/SQL then back to SQL in an elaborate, dynamic way. This is a costly waste of resources and will not scale (this is before we get to the problem of having to read the SQL statement from a table in the first place)
    I would recommend looking the INSERT SELECT statement here: http://psoug.org/reference/insert.html
    This will get the job done in one go. If you really do need it to be dynamic (which you don't, trust me) then you can still store this statement in your "dynamic SQL" table and execute it using EXECUTE IMMEDIATE although I can say for sure that you're going to run into more problems down the line with this architecture, it won't scale very well, and you'll probably waste at least *1* day of your time every week trying to fix a bug caused by the removal of a table, change to a column name etc.......
    However if you believe that storing SQL in a table is the best solution to your problem then go ahead.....at least when you find out that it isn't you'll have learned a valuable lesson.

Maybe you are looking for

  • What is the best way of putting music onto another iphone?

    What is the best way of putting music onto another iphone for a different itunes account user and different phone carrier? multiple user accounts on my mac? or home sharing to put the music on? then they have their own itunes account for apps etc?

  • Crystal Rpts XI runtime error

    When trying to open the calendar to enter a date range in a custom report I get a runtime error: objected expected in line:78. I installed the monthly hotfix 12 version 11.0.0.2182 but it didn't help. I would refresh the report >> prompt for new para

  • Condition tags set up in FrameMaker don't display correctly in RoboHelp for TCS 3.5

    Hi everyone, I am using Technical Communication Suite 3.5 (which is FrameMaker 10 and RoboHelp 9). From past discussions I understand that there are two methodologies for working with conditional text. Conditionalize the text in FrameMaker and then c

  • FrameMaker 7.0 MingLiu font changed to AbnormalMing (畸明體)

    Hello. We have a FrameMaker document in Traditional Chinese. It uses MingLiu font ( 細明體). Everything worked OK. But now some how font changed to AbnormalMing (畸明體). So on some machine the document becomes unreadable. We can't find this font is Window

  • Determine which version of producer tools to download

    In Adobe folio builder panel my version is: 12.3.1.20120730_m_695362 7.5.5.20 We are using adobe InDesign cs 5.5 I am on a mac and my co-worker is on a PC. I need to find the correct link to the folio producer tools that is v20 so we stay compatiable