Display all the rows in the table with Varray

I created two Varrays
CREATE TYPE phone_varray AS VARRAY(3) OF NUMBER(10);
CREATE TYPE email_varray AS VARRAY(3) OF varchar2(30);
CREATE TABLE ee
(id number(2),
phone phone_varray);
now i inserted some rows into ee table and displayed it as:
SELECT e1.id,e2.COLUMN_VALUE"PHONE NO" FROM ee e1,TABLE(e1.phone) e2;
ID PHONE NO
1 1111111111
1 2222222222
1 3333333333
1 1111111111
1 2222222222
1 4444444444
4 1111
4 2222
4 33334
5 1111
5 2222
5 33334
Then i altered the table with email_varray
desc ee;
Name Null? Type
ID NUMBER(2)
PHONE PHONE_VARRAY
EMAIL EMAIL_VARRAY
I updated some rows:
update ee e1 set email=email_varray('aasda') where id=4;
and when i try to display the table data by:
SELECT id,e2.*,e3.* from ee e1,TABLE(e1.phone) e2,TABLE(e1.email) e3;
it only displays the rows that contain all the details like
ID COLUMN_VALUE COLUMN_VALUE
4 1111 aasda
4 2222 aasda
4 33334 aasda
and not all the rows that are in the table which have id and phone and email as NULL
need help to display all the rows in the table.

will this work for you ?
SELECT e1.id,e2.COLUMN_VALUE as PHONE_NO, null as email FROM ee e1,TABLE(e1.phone) e2
union
SELECT e1.id,null,e3.column_value as email from ee e1, TABLE(e1.email) e3;

Similar Messages

  • Cannot display all the tables of the schema!!!

    Hi:
    I use the oracle sql developer on the windows xp, I found that the tables tab cannot display all the tables of the schema owner, I use the sql "select count(*) from user_tables" I found the result is more than the tab can be display, and I also press the "show more" already.... does anyone can help me ???

    Similarly, I have 852 tables owned by the connected user (selected count from user_tables and checked the user tables report which has this many records returned), but when I double-click on the "Show More" and select Show All, I only get approximately 375 tables listed.
    It doesn't help that the sorting is different - ie ASF_ comes before ASFB in the connection pane but the other way around in the report.
    However, it looks as though the problem is that tables that are not analysed (based on the report data in DATE_LAST_ANALYZED) are not being displayed under the Table node.

  • Problem while displaying all the table names from a MS Access Data Source.

    I started preparing a small Database application. I want to display all the Table Names which are in the 'MS Access' Data Source.
    I started to executing by "Select * from Tab" as if in SQL.
    But i got an error saying that "Not able to resolve Symbol 'Tab' in the query".
    Please let me know how can i display all the table Names in the MS Access Dats Source.

    Here i am developing the application in Swing using JDBC for accessing the database.
    I want to display all the Table names from the data source in a ListBox for easy selection of tables to view their details.

  • How to use evdre to display all the levels under the node user choose

    I used SELF,LDEP(6) in the memberset of evdre trying to display all the 6 levels from the top node of NetIncome, all the display all the level with the correct amount except the top node which is displayed in the row key, but all the cell which should be the aggregation of all it's children is blank, if I choose only self, it shows the amount with only top level. how could I all the level and the corresponding amount display?

    Hi,
    Did you try SELF,ALL ?
    Hope it works...
    regards,
    Raju

  • How to display All the rows in a Table

    Hi All,
    Our requirement is, we need to display all the records of an VO in a table. We should not have navigation bar with previous and next. Runtime only will come to know how many records the VO has. Is it possible to achieve our requirement using setNumberOfRowsDisplayed() method in OATableBean ?

    Do u want to do it declaratively or programmatically.
    Declaratively You can set no of rows property of table bean. If u want to set it programmatically then u can do it as discussed in the thread..
    Regards,
    Ram

  • How to check the number of rows in a table with input data?`

    Dear all,
    I am having a table ( with declaration of 5 rows during the init ) there's a next button which will add another 5 rows by pressing. Let say the user ony key in 7 rows of data.. how should i track it? coz these data act as input to my bapi function. One of the input field of my bapi is to state how many rows of data that a user had key in. Thank you.

    I think ur problem is empty records, u dont want to process empty table rows.
    m I right?
    if yes then just before processing the data / records, check for empty records and remove unwanted rows from the node.
    for (int i = 0; i < TableNode.size(); i++)
             if all cells of row(i) are empty
                   remove row(i) from Table Node.
    OR if you dont want to remove empty rows from display (screen), then at the time of processing, transfer useful rows to a separate node and process that node.
    Best Regards
    Deepak

  • A transacction or table which can display all the souce system

    Hi,
    Is there any transaction or table which can display all the source systems?
    Thanks in advance.

    RSA1->Modeling-> Click on Source Systems, here you can see all the source systems connected with BW.
    tcode: SM59 & expand all the connections. Here you can see all the connections.
    Hope it helps..

  • How to find accurate number of Rows, and size of all the tables of a Schema

    HI,
    How to find the accurate number of Rows, and size of all the tables of a Schema ????
    Thanks.

    SELECT t.table_name AS "Table Name",
    t.num_rows AS "Rows",
    t.avg_row_len AS "Avg Row Len",
    Trunc((t.blocks * p.value)/1024) AS "Size KB",
    t.last_analyzed AS "Last Analyzed"
    FROM dba_tables t,
    v$parameter p
    WHERE t.owner = Decode(Upper('&1'), 'ALL', t.owner, Upper('&1'))
    AND p.name = 'db_block_size'
    ORDER by 4 desc nulls last;
    ## Gather schema stats
    begin
    dbms_stats.gather_schema_stats(ownname=>'SYSLOG');
    end;
    ## Gather a particular table stats of a schema
    begin
    DBMS_STATS.gather_table_stats(ownname=>'syslog',tabname=>'logs');
    end;
    http://www.oradev.com/create_statistics.jsp
    Hope this will work.
    Regards
    Asif Kabir
    -- Mark the answer as correct/helpful

  • How can i display all the query items to a table?

    how can i display all the query items to a table in a jsp file?
    i always have an out of memory error..

    any body??any idea?
    is it possible thru configuration or i have to write a program by the abaper??
    Biswa

  • My phone was sitting on the table, with nothing turned on, and all of a sudden it sounds like there is air coming out of my speakers.

    My phone was sitting on the table, with nothing turned on, and all of a sudden it sounds like there is air coming out of my speakers.  It does this for 1 minute straight, then will stop. When I pick it up, then set it back down, it does it again.
    HELP!!!

    No nothing will show up on the screen.. If I push the 'home' center button it continues doing it, same with the sleep/wake button.
    I thinking it may be static out of my speakers --but I don't understand why all of a sudden it is dong this. I have had no problems with this phone, until now.

  • COunt no of rows  of  all the tables

    hai
    Pls tell me COunt no of rows of all the tables in the user SOP
    Output like this
    Tablename rows
    sen 31
    van 45
    etc
    pls help
    S

    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    begin
    dbms_output.put_line(rpad('Table Name',40)||' Number of Rows Created Date');
    dbms_output.put_line(rpad('-',73,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select object_name, created from dba_objects where object_type='TABLE' and OWNER='SOP') loop
    dbms_sql.parse(cur,'select count(*) from SOP.' || t.object_name, dbms_sql.v7);
    dbms_sql.define_column(cur, 1, rs);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_output.put_line(rpad(t.object_name,48,'.')||rpad(rs,15,'.')||t.created);
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',73,'-'));
    end;
    set serveroutput off feedback on feedback 6
    Anyway or...
    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    v_user varchar2(20);
    begin
    v_user := '&user';
    dbms_output.put_line(rpad('Table Name',40)||' Number of Rows Created Date');
    dbms_output.put_line(rpad('-',73,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select object_name, created from dba_objects where object_type='TABLE' and OWNER=v_user) loop
    dbms_sql.parse(cur,'select count(*) from '|| v_user ||'.' || t.object_name, dbms_sql.v7);
    dbms_sql.define_column(cur, 1, rs);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_output.put_line(rpad(t.object_name,48,'.')||rpad(rs,15,'.')||t.created);
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',73,'-'));
    end;
    Enter value for user: TEST
    old 11: v_user := '&user';
    new 11: v_user := 'TEST';
    Table Name Number of Rows Created Date
    TEST_UPDATE2....................................1..............21-JAN-09
    TEST_UPDATE.....................................1..............20-JAN-09

  • How to find out all the tables associated with particular T-code or Program

    Hi All,
    In 4.6B we have a transaction code SE49, where we can see all the tables associated with particular Transaction code or Program.
    But in ECC 5.0 or in ECC 6.0 this transaction code is not available.So is there any alternative where i can find out all the tables associated with particular T-code or Program.
    Thanks
    Shubham

    Hi,
    you are right, Transaction SE49 as well as SE48 do not exist anymore I'm afraid, they        
    are discontinued.                                                              
    You might try to create a transaction variant:                                        
    1) Start SE93 to create a transaction variant                                         
    2) Specify a name, eg. ZSE49, and choose the first option:                            
       "program and screen (dialog transaction)                                           
    3) Here specify SAPMSEUZ as program, and 200 as screen number                         
    4) Choose a suitable development class (package) if you want it to be                 
       transportable or Local (=$TMP) if non-transportable                                
    5) press Save                                                                         
    Same applies for SE48, same program but dynpro 100.                                   
    Sorry for not being able the reasons behind the decision to discontinue            
    these transactions. I suppose at least part of the functionality was               
    integrated in SE38.           
    Best regards
    Erika

  • Import the table with 0 rows

    Hi
    I have a problem to import a dump that contains the tables with 0 rows.
    When i exported from ORACLE 11.2 64 bit on SERVER 2008 i noticed that log didn't confirm the tables with 0 rows.
    When i want to import to ORACLE 11.2 64 bit on other SERVER 2008 i have a lot of errors on this tables with 0 rows.
    In the log i get the same tables with 1 row at least, but no one with 0 rows.
    I open my dump in TEXTPAD and i see it contains "CREATE ....." these tables.
    I don't understand why it happens. I used FUll DUMP by SYS, it didn't help.
    This is not first time when i export and import dumps,no errors.
    I'm using command "EXP" and "IMP" and every time it's ok.(IF it's a releavent)
    Why it happens? any solutions for this issue?
    Thanks

    I've found (i guess so) solution to this issue
    here are two links to this new feature that is called deffered segment creation
    The reason for this behavior is 11.2 new feature ‘Deferred Segment Creation‘ – the creation of a table sent is deferred until the first row is inserted.
    As a result, empty tables are not listed in dba_segments and are not exported by exp utility
    http://www.nativeread.com/2010/04/09/11gr2-empty-tables-skipped-by-export-deferred-segment-creation/
    http://antognini.ch/2010/10/deferred-segment-creation-as-of-11-2-0-2/
    And this is i've found in official documentation from oracle
    Beginning in Oracle Database 11g Release 2, when creating a non-partitioned heap-organized table in a locally managed tablespace, table segment creation is deferred until the first row is inserted. In addition, creation of segments is deferred for any LOB columns of the table, any indexes created implicitly as part of table creation, and any indexes subsequently explicitly created on the table.The advantages of this space allocation method are the following:A significant amount of disk space can be saved for applications that create hundreds or thousands of tables upon installation, many of which might never be populated.Application installation time is reduced.There is a small performance penalty when the first row is inserted, because the new segment must be created at that time.
    To enable deferred segment creation, compatibility must be set to '11.2.0' or higher. You can disable deferred segment creation by setting the initialization parameter DEFERRED_SEGMENT_CREATION to FALSE. The new clauses SEGMENT CREATION DEFERRED and SEGMENT CREATION IMMEDIATE are available for the CREATE TABLE statement. These clauses override the setting of the DEFERRED_SEGMENT_CREATION initialization parameter.
    +Note that when you create a table with deferred segment creation (the default), the new table appears in the _TABLES views, but no entry for it appears in the SEGMENTS views until you insert the first row. There is a new SEGMENTCREATED column in _TABLES, _INDEXES, and _LOBS that can be used to verify deferred segment creation+
    Note:
    The original Export utility does not export any table that was created with deferred segment creation and has not had a segment created for it. The most common way for a segment to be created is to store a row into the table, though other operations such as ALTER TABLE ALLOCATE EXTENTS will also create a segment. If a segment does exist for the table and the table is exported, the SEGMENT CREATION DEFERRED clause will not be included in the CREATE TABLE statement that is executed by the original Import utility.

  • Setfilter to display all the duplicate rows pb7

    Friends,
    my version is powerbuilder 7.
    i am checking the duplicate rows in the datawindow before inserting.
    in a button click event...i have the below code
    dw_master.SetSort ("rollno A")
    dw_master.Sort()
    dw_master.SetFilter("rollno = rollno[-1]")
    dw_master.Filter()
    if dw_master.RowCount() > 0 then
        MessageBox('Duplicate Rows','Check the Duplicate Roll numbers',StopSign!,OK!)
        Return 1
    end if
    //no dups, so clear the filter and do the update...
    dw_master.SetFilter ("")
    dw_master.Filter()
    i have 2 duplicate rows...but this setfilter is displaying only one row....
    if it displays all the duplicate rows then it will be very useful for me...
    how can i modify this code to get all the duplicate rows in this datawindow before inserting?
    thanks

    Instead of a filter you could do this...
    boolean lb_dupe_found=false
    long ll_row, ll_rowcount
    string ls_val1, ls_val2
    ll_rowcount = dw_1.rowcount()
    for ll_row = 2 to ll_rowcount
    ls_val1 = dw_1.getitemstring(ll_row, 'col1')
    ls_val2 = dw_1.getitemstring(ll_row -1, 'col1')
    if ls_val1 = ls_val2 then
      // duplicate
      lb_dupe_found = true
      exit
    end if
    next
    if lb_dupe_found then
    messagebox('DUPE', 'Houston we have a problem!')
    else
    messagebox('SAVE', 'Data valid for saving')
    end if

  • How to find out all the tables in a schema with a particular column

    Hi
    Is there a way to find out all the tables in schema1 that has col1 as one of the columns?

    select table_name from dba_tab_cols where owner='schema' and column_name='col1';

Maybe you are looking for

  • How to show all the rows in a report

    I have a report, and i want to show all the rows in a page, how to do it. Currently, i just show part of rows. Thanks, Jen

  • RFC Sender Adapter - Java Mapping

    Hello i want to make a call from R3 -> XI via the RFC Sender Adapter, process the R3 Call inside a Java Mapping and return to results to R3 (synchronous RFC call) how do i setup Interface and Message mappings and the corresponding sender and receiver

  • Print options open slowly when choosing "printer" icon or using CTRL+P.

         This has been an ongoing problem where I work. Basically we view Purchase orders through Acrobat Pro or Reader and print them to wherever they may need to go. The Problem we have, on only certain computers, is that the print options screen is ve

  • Item master synchronisation from third party system to SAP

    Hello , I would like to understand how we can desgin flow of data in case of changes in Catalog from third party system to SAP. We have implemented Catalog functionality.  Catalog maintained in third party system is accessed from SAP for procurement

  • Handling Multiple web items

    Hi, How do i code multiple web items for: a) Web printing - i've referred to the HOW TO GUIDE.. however it shows illustration of a single table item. I have multiple web items including graphs/chart that I would like to print. Also some columns are n