Single-column-multi-Rows, columns by using Types of Collection

Can you guys help me get the result after using types of collection or all the predefined collections?

In fact, I'm trying to compare the results of the columns col1 and col2 against a single value, so try to get the output in a single column.

Required output should be like

SQL > with t as (1 select col1, col2 2 double)

2 Select * from t;

COL

----------

1

2

Please suggest any solutions using regexp/connect by / or etc.

Well, then:

SQL> with t as (select 1 col1, 2 col2 from dual)
  2  select nt.column_value
  3  from t
  4     , table(sys.odcinumberlist(col1, col2)) nt
  5  ;

COLUMN_VALUE
------------
           1
           2

but it is overkill IMO.

Tags: Database

Similar Questions

  • using code ecommerce ecwid in muse - all in a single column?

    Although new to the use of Muse, I have good experience with DW.

    In its simplest form, the link here on how to place the code in Muse:http://kb.ecwid.com/w/page/49244914/Adobe%20Muse

    (using ' insert Html code ' on page muse, it's the code)

    " < div id ="my-store-4167334"> if you, your browser does not support JavaScript, please go to its < a href =" http://app.ECWID.com/JSP/4167334/catalog "> < /a > simple HTML version.» < / div > < div >

    " < script type =" text/javascript"src =" http://app.ECWID.com/script.js?4167334 "charset ="utf-8"> < / script > < script type =" text/javascript"> xProductBrowser ("categoriesPerRow = 3 "," views = grid (3,3) list (10) table (20) "," categoryView is grid "," searchView = list "," id = my - store - 4167334 "); < /script > "

    < / div >

    The categories are all pushed in a single column instead of extending horizontally. He runs down and I can't manipulate the image, it only extends. If I click on the clothes to view the products, it will worsen. As much I as know I can not add the code to a container or a div in muse? Check it out- http://www.windrivergear.com/test/gear.html

    If I create a blank page in DW, define a div and place the code of ecwid in, its fine. So the question is more within the Muse or the lack of ability to set a div in the code ecwid.

    If all goes well, Miss me something simple.

    Any ideas?

    Hello

    Could you please try stretching from the HTML box to the right and check if this may help?

    It worked fine for me the box insert code HTML has been stretched to the right.

    Kind regards
    Sachin

  • I use Photoshop elements on Windows 8.1 12.  When I go in the Expert Mode to change the available toolbar is displayed in a single column and missing several tools which foreground and background color.  How to restore the original toolbar?

    I use Photoshop elements on Windows 8.1 12.  When I go in the Expert Mode to change the available toolbar is displayed in a single column and missing several tools which foreground and background color.  How to restore the original toolbar?

    Try to re - set preferences.

    Go to: Edit > preferences > general (menu Photoshop Elements on Mac)

    Click on the button Reset preferences on the next launch

  • Yosemite stuck in a single column, view column for the finder discovers all files

    I use Yosemite on a MacBook Air and I am an old user of Mac since 1989. Today, I can not go single column, all files display even if the menu or the icon indicates that I should see display multi-column.   Y at - it a known bug, or a way to reset this?  Thank you.

    It is normally enough to 'reset ':

    Apple-> Forcequit menu: relaunch the Finder.

    If this does not help:

    Restart the mac in shift: starts in mode safe, slow, connection; When logged in, restart normally.

    Lex

  • Selection of Pixel single column, then paste...

    Hello

    This might look like a very unusual request, but I was upset to find the answer.

    In a given photographic image, I would choose a single pixel in each row of pixels, running up and down in a columnof a pixel.  Then, I want to eliminate (Cup) nothing else on the Web with the exception of the one column of selected pixels. From there, I would take the pixel selected in each line and copy the pixel color on each line on the left and right of the pixel selected.

    The end result is that I have a series of horizontal lines of pixels height of one color (based on the color of the selected pixel) through the image of left and right.

    Looking at this picture:

    Select a single pixel on each line in a single column-

    xxxxxx XXXXXXS

    xxxxxx XXXXXXS

    xxxxxx XXXXXXS

    Remove/cut everything except the selected pixels in only one column-

    ...... S......

    ...... S......

    ...... S......

    Now, on each line, copy single pixel selected to the left and the right of the selection, to the extent of the canvas-

    SCOTTS SCOTT

    SCOTTS SCOTT

    SCOTTS SCOTT

    Interesting challenge or Easy-Peasey?

    Thank you!

    Easy. Use the brand single pixel tool to select a line of pixels. Cmd/Ctrl-J to copy pixels into a new layer. CTRL/cmd-click on the layer icon to select these pixels. CTRL/cmd-T to turn those pixels on the width of the image.

  • Convert lines to a single column

    Hi all


    Need help, I have a table where I want the output to a single column

    ex: Select in t1. *
    the query result_

    rownum col_1
    1 8217
    2 6037
    3-5368
    4 5543
    5 5232

    I want the result to be: * 8217,6037,5368,5543,5232 *.


    Thank you for your help in advance.

    I search the web but couldn't find a solution that is easily understandable.

    WM_CONCAT is not documented, so not everyone would want to use it in production code.
    However, SYS_CONNECT_BY_PATH might work:

    SQL> create table t as
      2  select 1 rn, 8217 count_1 from dual union
      3  select 2, 6037 from dual union
      4  select 3, 5368 from dual union
      5  select 4, 5543 from dual union
      6  select 5, 5232  from dual;
    
    Table created.
    
    SQL> select * from t;
    
           RN    COUNT_1
    --------- ----------
            1       8217
            2       6037
            3       5368
            4       5543
            5       5232
    
    5 rows selected.
    
    SQL>
    SQL> select rownum
      2  ,      ltrim(sys_connect_by_path(count_1, ','), ',') count_1
      3  from   t
      4  where  connect_by_isleaf=1
      5  start with t.rn=1
      6  connect by t.rn  = prior t.rn+1;
    
     ROWNUM
    -------
    COUNT_1
    -------------------------------------------------------------------------------------
          1
    8217,6037,5368,5543,5232
    
    1 row selected.
    

    Or LISTAGG on 11.2:

    SQL> select listagg(count_1, ',') within group (order by rn) agged from t;
    
    AGGED
    -------------------------
    8217,6037,5368,5543,5232
    
    1 row selected.
    

    I really hope that you do not really use ROWNUM as column name? I used instead RN...

  • Convert a single column into multiple lines

    Hi people,

    I have a task to display a single column into multiple lines (for use in LOV)

    For Ex:

    The column consistes of value such as 98,78,67,68,34,90. -It's a unique column values where none of the values can be ' number that is separated by commas

    Then we must view it as

    98
    78
    67
    68
    34
    90
    -under the number of lines (no lines can be ' do not number).

    Thanks in advance

    Try this...

    SQL> ed
    Wrote file afiedt.buf
    
      1  select regexp_substr('98,78,67,68,34,90', '[^,]+',1,level) Value
      2    from dual
      3*   connect by level <= regexp_count('98,78,67,68,34,90',',') + 1
    SQL> /
    
    VALUE
    -----------------
    98
    78
    67
    68
    34
    90
    
    6 rows selected.
    

    Thank you!

  • Object Table of XMLType vs single column of XMLType Table

    What are the differences between the XMLType table object and a table with a single column of XMLType?

    It's

    CREATE TABLE XMLType xml_table;

    and

    CREATE TABLE xml_table (xml_field XMLTYPE);

    That should be used and when? Both may be declared to be aware of schema.

    The main difference is that an XMLType object array allows the use of the XML DB Repository to store and retrieve XML content.
    The relationship between a resource and its content is maintained by a "pointer" (REF XMLType) line in the XMLType table:

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb03usg.htm#ADXDB4223
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb03usg.htm#BJFBDEJE

    Tables based on the patterns of XMLType (including the associated nested structure) can also be created automatically through recording scheme, which is very convenient when the pattern becomes complex.
    In addition, a registred schema-compliant documents that go into the repository automatically stored in the table by default (see the annotation xdb:defaultTable).
    We can also use ACLs to control access to specific rows in a table of object XMLType.

    This is not possible with XMLType columns in a relational table.

  • Click for a single column in DataGrid event

    I can add an event listener for a DataGrid of type ListEvent.ITEM_CLICK, which is triggered when the user clicks on any part of an entire row in a DataGrid. I want to trigger a click for a single column event. I want only to run a function when the user clicks in just the first column in the data grid and not run raise the event if they click in any other column. Any help would be appreciated.

    EU: event.columnIndex

  • Merge multiple columns into a single column?

    Hello

    I need to perform queries dynamically and the return values. I need to retrieve the values of the queries in a single column only by concatenating multiple columns. I can't use the PL/SQL in my scenario.
    is it possible to run a query and the result will be extracted in a single column (multiple column values must be concatenated)?

    Thank you
    Raja.
    SELECT rtrim(extract(xmltype(REPLACE(column_value,'
    

    Check this box... Copy it directly to this

    Ravi Kumar

  • View all in a single column, instead of lines (part 1)

    Hi all

    Help, please...
    How to make my lines of output SQL to display on a single column?
    I have a table: EMP & 3 columns: ID, ENAME, and BIRTHDAY.

    I inserted 3 rows in the table:
    ID ENAME BIRTHDAY
    1 Smith 11/09/1980
    2 Jones 01/01/1981
    3 Baker 02/02/1982

    I want the output of my query in Oracle Developer / ApEx to display like this:
    Employees
    ---------------

    Smith
    11/09/1980

    Jones
    01/01/1981

    Baker
    02/02/1982

    Best regards
    Sunenny

    Published by: user643233 on November 6, 2008 09:10

    Strange formatting. Maybe you could try something like this...

    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    SQL> CREATE OR REPLACE TYPE varchar2_table AS TABLE OF VARCHAR2 (4000);
      2  /
    
    Type created.
    
    SQL> SELECT column_value
      2  FROM   emps, TABLE (varchar2_table (NULL, ename, hiredate));
    
    COLUMN_VALUE
    --------------------------------------------------------------------------------
    
    SMITH
    17-DEC-80
    
    ALLEN
    20-FEB-81
    
    WARD
    22-FEB-81
    
    JONES
    02-APR-81
    
    MARTIN
    28-SEP-81
    
    BLAKE
    01-MAY-81
    
    CLARK
    09-JUN-81
    
    SCOTT
    19-APR-87
    
    KING
    17-NOV-81
    
    TURNER
    08-SEP-81
    
    ADAMS
    23-MAY-87
    
    JAMES
    03-DEC-81
    
    FORD
    03-DEC-81
    
    MILLER
    23-JAN-82
    
    42 rows selected.
    
    SQL>
    
  • Trying to create a Section to multiple columns with Sections of the single column before and after

    Is there a way to create a section break that is not default to a new page after I created columns on a page.  I created the columns and under them, I want to return to the normal formatting for the rest of the single page.  See picture attached.

    Any rejection of Pages v5 has a break of presentation which was present in the Pages ' 09 v4.3. This will allow you to transition to several columns and back to single column on the same page. In the v5 Pages, you can insert 3 text boxes and change the 3-column layout in the Middle text box. You use the toolbar item Insert to inject column breaks when you want to start a new list in the next column. I'll show this screenshot below.

    You can fake your layout in Pages v5 using 3 text boxes and setting 3 columns in the Central text area. Better to show the mode of provision for this and in a text box, the column outlines are not displayed. After each column list, you then choose column break the Insert point toolbar menu to move to the next column, add a list, repeat. Each column will expand downwards. Click on the following to enlarge.

    Pages ' 09 v4.3 using layout breaks Pages using 3 text boxes V5.6.1                                                      

      

  • Remove the clicked point of Listbox (single column)

    Hello

    It seems a lot of posts on clear lines of the programmatically multicolumn listbox but not the only column listboxes.

    Woth the help of Martins and GerdW, helped me build a subset of a ListBox with items clicked in a reference list

    Make a table of items clicked in a list

    . How it adds a feature to delete just in case rather than the deletion of the entire list and do it all over again.

    Thanks in advance.

    Have an array of strings to the "REF" enter in the list box and store it on a shift register. When you remove an item (for example, for an event), remove this item from the list (using the removal of the table) and write back to the property Ref of the listbox. A single-column list box works exactly the same way as a multicolumn listbox.

    (Excuse the broken links to properties - what happens when you create an excerpt)

  • I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?

    I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?

    11.1 and especially you have virtual column

    SQL> create table t
      2  (
      3     a number
      4   , b number
      5   , c generated always as (a+b) virtual
      6  );
    
    Table created.
    
    SQL> insert into t (a, b) values (1, 2);
    
    1 row created.
    
    SQL> select * from t;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
    

    Before that, a front insert - trigger

    SQL> create table t
      2  (
      3     a number
      4   , b number
      5   , c number
      6  );
    
    Table created.
    
    SQL> create or replace trigger t_default before insert on t for each row
      2  begin
      3    :new.c := :new.a+:new.b;
      4  end;
      5  /
    
    Trigger created.
    
    SQL> insert into t (a, b) values (1, 2);
    
    1 row created.
    
    SQL> select * from t;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
    
  • How can I know the number of columns in a TYPE?

    Hello

    If we have a guy like below

    type vc_arr2 is table of the varchar2 (32767) index directory.

    How can I get the number of columns?

    Minoo.TK wrote:

    Hello

    If we have a guy like below

    type vc_arr2 is table of the varchar2 (32767) index directory.

    How can I get the number of columns?

    It is a type of associative array definition. A table has no columns. It is a collection of elements (variables or values). An array location is usually called a cell.

    The standard method Count() exist in Oracle for all table types.

    As for the definition of the table, as in structures, variables make the table contain - associative array is defined in the PL/SQL code and does not exist in the layer of metadata to the database as a new user-defined type. For the definition, you must read the declaration of PL/SQL defining the table.

    Note that there is very rarely the need for associative tables in PL/SQL - 99% of the time they are used without any idea as to what as a table associative is also.

Maybe you are looking for

  • 10 TECRA, toshiba power saver does not work on vista

    I can change the options of the program of toshiba power saver 3.2.0 as cooling method (performance, max, optimized, cooling performance optimized battery) in the parameters Panel / battery /... or directly in the BIOS but-values in the bios and in t

  • Qosmio G10: How to get Toshiba virtual sound in the taskbar

    System: Qosmio G10 running Windows XP. When I bought the system, it came loaded with application of 'Virtual Sound' of Toshiba, which has replaced the standard Microsoft Volume control app in the XP taskbar (bottom right of the screen). Now, the 'Vol

  • Re: L500-1XU PSLJFE xp drivers

    I just bought a laptop L500-1XU PSLJFE and I can't find the XP drivers? Why? They do not exist?

  • HP 14 R0-25TX: Ram upgrade HELP!

    I have a HP 14 R0-25TX and I thought of the evolution of its its current 2 GB 800 mhz Ram to 4 GB 1600 mhz.  Can I put in a 4 GB 1600 mhz? BTW, I use windows 8.1 and what is the maximum RAM capacity? Sorry for my bad English and I thank you.

  • Repeatedly offered KB979683

    is there no simple correction for this problem * Title *.on me dit sans cesse de télécharger référence sécurité KB979683-en fait ive fait donc environ 40 fois-toutes réponses possibles sembler charabia-gook pour un profane comme moi