Row array values to be shown in one column

INTPUT
T[0] = 123
T[1] = 124
T[2] = 125
X[0] = X0
X[1] = X1
X[2] = X2
X[3] = X3
A[0] = A0
A[1] = A1
Y[0] = Y0
Y[1] = Y1
Y[2] = Y2
OUTPUT =
T     X     A     Y
===========================
123     X0     A0     Y0
124     X1     A1     Y1
125     X2     null     Y2
null     X3     null     null

Hi,
782331 wrote:
CREATE TABLE testinput (
T0 varchar2(30) ,
T1 varchar2(30) ,
T2 varchar2(30) ,
X0 varchar2(30) ,
X1 varchar2(30) ,
X2 varchar2(30) ,
X3 varchar2(30) ,
A0 varchar2(30) ,
A1 varchar2(30) ,
Y0 varchar2(30) ,
Y1 varchar2(30) ,
Y2 varchar2(30) )
insert into testinput ( T0 , T1 , T2 , X0 , X1 , X2 , X3 , A0 , A1 , Y0 , Y1 , Y2 )
values ( '123','124','125','X0','X1','X2','X3','A0','A1','Y0','Y1','Y2' );Oh! Your table has 1 row and 12 columns. In your first message, it looked like it had 12 rows and 2 or 3 columns.
(Actually, the number of rows doesn't matter.)
In that case, you want Unpivot rather than pivot.
A better way to do unpivot was also introduced in Oracle 11. Since you I don't know what version you have, I'll show you the less elegant way, which will work in Oracle 9 or higher so the chances that you can use it are higher:
WITH     got_r_num     AS
     SELECT     LEVEL - 1     AS r_num
     FROM     dual
     CONNECT BY     LEVEL <= 4
SELECT       CASE  r.r_num
            WHEN  0  THEN  t.t0
            WHEN  1  THEN  t.t1
            WHEN  2  THEN  t.t2
            WHEN  3  THEN  NULL     -- Default, but it doesn't hurt to say so explicitly
       END          AS t
,       CASE  r.r_num
            WHEN  0  THEN  t.x0
            WHEN  1  THEN  t.x1
            WHEN  2  THEN  t.x2
            WHEN  3  THEN  t.x3
       END          AS x
,       CASE  r.r_num
            WHEN  0  THEN  t.a0
            WHEN  1  THEN  t.a1
                        ELSE  NULL
       END          AS a
,       CASE  r.r_num
            WHEN  0  THEN  t.y0
            WHEN  1  THEN  t.y1
            WHEN  2  THEN  t.y2
            WHEN  3  THEN  NULL
       END          AS x
FROM            testinput  t
CROSS JOIN     got_r_num  r
ORDER BY  r_num
;For every row in your table, we want 4 rows of output. To get that, we can join each row in the table to 4 rows in some other table. (In this example, the other "table" is actually the result set of a sub-query.)
With minor changes, the same approach will work in Oracle 8 and earlier versions, too.

Similar Messages

  • I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".

    Hello,
    I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".
    Suppose , 
    Parameter value : person 1,person2,person3 
    table structure : 
    Project Name | officers 1 | officers 2
    here, officers 1 or officers 2 may contain names of multiple people.
    expected OUTPUT : distinct list(rows) of projects where person 1 or person 2 or person 3 is either officer1 or officer 2. 
    please explain or provide solution in detail 
    - Thanks

    Hi Visakh,
    Thanks for reply.
    But the solution you provided giving me right output only if officer 1 or officer 2 contains single value , not with comma seperated value.
    Your solution is working fine for following scenario : 
    Project 
    Officers 1
    Officers 2
    p1
    of11
    off21
    p2
    of12
    off22
    with parameter : of11,off22 : it will give expected output
    And its not working in case of :
    Project 
    Officers 1
    Officers 2
    p1
    of11,of12
    off21,off23
    p2
    of12,of13
    off22,off24
    with parameter : of11,off22 : it will not give any row in output
    I need patten matching not exact match :) 
    ok
    if thats the case use this modified logic
    CREATE PROC GetProjectDetails
    @PersonList varchar(5000)
    AS
    SELECT p.*
    FROM ProjectTable p
    INNER JOIN dbo.ParseValues(@PersonList,',')f
    ON ',' + p.[officers 1] + ',' LIKE '%,' + f.val + ',%'
    OR ',' + p.[officers 2] + ',' LIKE '%,' + f.val + ',%'
    GO
    Keep in mind that what you've done is a wrong design approach
    You should not be storing multiples values like this as comma separated list in a single column. Learn about normalization . This is in violation of 1st Normal Form
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Export different value what we display in one column of answers

    I have a column which has almost 50 concatenated values by comma. I don't want to display all values to user in report. Just I will display "Multiple" instead of all these concat values. But when user export the report. User must see all concatenated values in that column.
    How can I achieve this?

    I do have a column in Oracle database  Contributor_List.  Which has following values in pipe separated way. There may be 50 values like in below example 3, 2 and 3 values are given.
    ABMB|BVAL|AFMY|
    ABMB|BVAL|
    MZSG|JSDP|DASJ|
    On OBIEE Answers, user want to get it displayed as "MULTIPLE" keyword because there may be 50 values. So these values will display as follows.
    MULTIPLE
    MULTIPLE
    MULTIPLE
    Now when exporting to excel, user again want to download the original value like   "ABMB|BVAL|AFMY|"  in place of "MULTIPLE"
    Just wanted to know how we can achieve this?

  • Inserting multiple selection from checkbox in to one column of the database

    Hi,
    how to insert multiple selection from checkbox into one column of the database.(I select array of values from checkbox ,then how to insert tat array of values iinto single column name).
    Anyone can u reply me
    Thanx

    hhhmmm.... is this what you mean?
    lets say you hava a checkbox1 with values value1, value2, value3 and you selected all there of them? then you want then to be stored in the database in one column?
    now the question is:
    Is it going to be one column one row?
    datafield
    value1,value2,value3
    Or one column multiple row?
    datafield
    value1
    value2
    value3
    Which is it?

  • Write three signals to spreadshee​t file (Each signal on one column)

    Hello,
    I have a simple task that I need some assistance with. To be brief, I am reading the angular values of 3 encoders and I am writing these values to a spreadsheet file at the press of a trigger. Everytime I press the trigger, the corresponding 3 angular values are written to the spreadsheet file. I press the trigger again, the next 3 angular values are appended to the same spreadsheet file, and so on.
    My problem is, the values are being written all under one column in the following manner:
    encoder1 (value1)
    encoder2 (value1)
    encoder3 (value1)
    encoder1 (value2)
    encoder2 (value2)
    encoder3 (value2)
    encoder1 (value3)
    encoder2 (value3)
    encoder3 (value3)
    .....and so on.....
    I would like to have these values written in a way that the values of each encoder are written to the corresponding column for that encoder (ie. 1 column per encoder) in the following manner:
    encoder1 (value1)     encoder2 (value1)     encoder3 (value1)
    encoder1 (value2)     encoder2 (value2)     encoder3 (value2)
    encoder1 (value3)     encoder2 (value3)     encoder3 (value3)
    ......and so on.....
    That is, I would like to have all the values of encoder1 written under the first column, values of encoder2 written under the second column and the values of encoder3 written under the third column.
    I attached the part of my VI related to my task. Any help would be greatly appreciated.
    Thank you,
    r15
    Attachments:
    encoders.vi ‏10 KB
    encoders.vi ‏10 KB

    I may have been misunderstood since I only posted a snippet of my code. So please find attached my complete working VI.
    I will be running a while loop and writing the data to a spreadsheet in that while loop everytime I press the trigger. In the end of my program, I will have multiple values for the encoders and not just one value for each encoder. Hence, in my spreadsheet I aim to have 3 columns (1 for each encoder) and a variable number of rows (between 10 to 20). So I want my spreadsheet to be a 2D array with 3 columns and n rows. (where 10<n<20).
    I hope this makes it clearer as to what I am trying to accomplish and I apologize for not being clear earlier.
    The problem I have is that all the values are being written to one column.
    Thank you,
    r15
    Attachments:
    sequential(3enc)-simplified.vi ‏44 KB

  • Is it possible to Lock just one column value in a row?

    Is it possible to Lock just one column value in a row
    A Java Developer has just asked me if it is possible to Lock just one column value in a row in Oracle
    select ename from emp where empno=7369 for update;
    EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    7369 SMITH      CLERK           7902 17-DEC-80        800                    20
    will lock the entire row with empno=7369.
    But is it possible to lock one column value from this row, like SAL=800 ?
    Edited by: J.Kiechle on Jan 8, 2009 10:45 PM

    J.Kiechle wrote:
    Is it possible to Lock just one column value in a rowNo. Locking granularity is a row.

  • Making whole row coloured red based on value in one column in BI Answers.

    Hi
    Would anyone know how to make a whole row red (eg) based on the value from one column within the row in
    a BI Answers report in either a pivot table or a table view. I know it should be a case of setting up the
    conditional formatting in the Conditional Tab on the Properties of the column, but all the columns apart from the
    one with the value being determined ignore the value in another column.
    Thanks,
    - Pete
    Edited by: user1636556 on 09-Dec-2011 07:58

    Hi
    Would anyone know how to make a whole row red (eg) based on the value from one column within the row in
    a BI Answers report in either a pivot table or a table view. I know it should be a case of setting up the
    conditional formatting in the Conditional Tab on the Properties of the column, but all the columns apart from the
    one with the value being determined ignore the value in another column.
    Thanks,
    - Pete
    Edited by: user1636556 on 09-Dec-2011 07:58

  • In Hgrid one row attribute value color

    Hi,
    My requirement is, i have to show Hgrid one row attribute value in any color.
    As per my understand we can show only the whole column values not the particular field in Hgrid by using css style.
    Please advise me if it is achievable.
    Thanks in advance
    Jyostna

    If you are looking for a random field coloring (randomly any particular column for a row based on some logic), this should not be possible.
    Thanks /Santanu

  • Formating the Row Based on one column value

    Hi Friends
    I am trying to format the Entire row based on the value of the first column in my Answers.
    Example if first column value in 'F' now i want the Entire row to be colored
    I can do conditional formating on one column but i want to do it on the entire row
    F     8.1 %     12.0 %
    E     5.2 %     3.5 %
    M     2.3 %     3.3 %
    If any one has done this or any suggestions please respond
    Thanks
    Sang

    Its a Pivot View
    F 8.1 % 12.0 %
    E 5.2 % 3.5 %
    M 2.3 % 3.3 %
    the column 1 --> F,E,M are the Product
    the column 2 --> 8.1% , 5.2% , 2.3% are the sales in year 2008
    the column 3 --> 12.0 % , 3.5 %, 3.3 % are the sales in year 2009
    So will i be able to apply the formating in pivot view based on one column to other column If yes please let me know how or
    suggest if this can be done using the BI Office , or BI publisher
    sing the BI Office i can do the formating in Excel but once i refresh the data all the formating is gone ... :(
    I am donno BI Publisher if we have to use BIP please suggest any solution its very very very urgent and important report formating they need here ....
    Thanks in advance David
    sango

  • Join all rows bases on one column value

    Hi All,
    I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
    table:Test
    id id_desc
    1 desc_a
    1 desc_b
    1 desc_c
    Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
    id id_desc
    1 desc_a
    desc_b
    desc_c

    orza wrote:
    Hi All,
    I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
    table:Test
    id id_desc
    1 desc_a
    1 desc_b
    1 desc_c
    Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
    id id_desc
    1 desc_a
    desc_b
    desc_cI'm guessing you want to pivot the results in TEST and use that to insert into TEST1?
    If so this may be useful
    http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php

  • Replacing one column value between two rows..help??

    HI,
    I have table T
    it has five columns, all are in number data type
    Col1 and col2 are jointly primary key i.e. they cannot be repeated combined
    when i run this query..
    SQL> Select * from t
    it shows me the data like this
    Col1        Col2              Col3       Col4           Col5
    1             1               78          58            12.76
    2             1               128         446           32.10
    3             1               468         566           52.10
    4             1               878         58            52.05
    5             1               987         348           22.02
    ... so on.
    my requirement is that i want to update this table by replacing the col1 value between any two rows
    suppose this is the first row
    Col1        Col2          Col3        Col4         Col5
    1             1             78          58        12.76
    and this is any 2nd row
    Col1        Col2          Col3        Col4        Col5
    5             1            987         348       22.02
    now i want that for first row the value of col1 replaces the value of col1 of 2nd row
    and for 2nd row the value of col1 replaces the value of col1 of 1st row
    i.e.
    Col1        Col2          Col3        Col4         Col5
    5             1            78           58         12.76
    Col1        Col2          Col3        Col4         Col5
    1             1            987        348          22.02
    please tell how to achieve this in single query/procedureregards,
    Ramis

    SQL> create table t (id1 number, id2 number, name varchar2(1));
    Table created.
    SQL> alter table t add primary key (id1,id2);
    Table altered.
    SQL> insert into t values(1,1,'A');
    1 row created.
    SQL> insert into t values(5,1,'B');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t;
           ID1        ID2 N
             1          1 A
             5          1 B
    SQL> var val1 number
    SQL> var val2 number
    SQL> exec :val1 := 1;
    PL/SQL procedure successfully completed.
    SQL> exec :val2 := 5;
    PL/SQL procedure successfully completed.
    SQL> update t set id1 = (:val1 + :val2) - id1 where id1 in (:val1,:val2);
    2 rows updated.
    SQL> select * from t;
           ID1        ID2 N
             5          1 A
             1          1 B
    SQL> rollback;
    Rollback complete.
    SQL> select * from t;
           ID1        ID2 N
             1          1 A
             5          1 B
    SQL> commit;
    Commit complete.
    SQL> update t set id1 = decode(id1,:val1,:val2,:val1)
      2  where id1 in (:val1, :val2);
    2 rows updated.
    SQL> select * from t;
           ID1        ID2 N
             5          1 A
             1          1 BRgds.

  • Search one column for value in another column

    Hello,
    I am trying to take the whole value from one column, and see if that string appears anywhere in another colmn. So if one row in one column has the value "cat", I want to see if that string appears anywhere in any row in another column: so a row with the value "The cat sat on the mat" would return true.
    I have tried:
    select term from pic_lib_keywords, csv
    where contains (csv.nhm_field_asset_description,pic_lib_keywords.term) >0;
    But I get the error:
    ORA-20000: Oracle Text error:
    DRG-50901: text query parser syntax error on line 1, column 32
    20000. 00000 - "%s"
    *Cause:    The stored procedure 'raise_application_error'
    was called which causes this error to be generated.
    *Action:   Correct the problem as described in the error message or contact
    the application administrator or DBA for more information.
    Can you use 2 columns in this way, or does the search term have to be a literal? Any suggestions would be appreciated.
    Thank you.

    It works for me, as shown below.
    SCOTT@orcl_11gR2> select * from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl_11gR2> create table csv
      2    (nhm_field_asset_description  clob)
      3  /
    Table created.
    SCOTT@orcl_11gR2> insert all
      2  into csv values ('The cat sat on the mat.')
      3  into csv values ('The dog sat on the mat.')
      4  select * from dual
      5  /
    2 rows created.
    SCOTT@orcl_11gR2> create table pic_lib_keywords
      2    (term  varchar2(30))
      3  /
    Table created.
    SCOTT@orcl_11gR2> insert all
      2  into pic_lib_keywords values ('cat')
      3  into pic_lib_keywords values ('mouse')
      4  select * from dual
      5  /
    2 rows created.
    SCOTT@orcl_11gR2> create index test_idx
      2  on csv (nhm_field_asset_description)
      3  indextype is ctxsys.context
      4  /
    Index created.
    SCOTT@orcl_11gR2> select term
      2  from   pic_lib_keywords, csv
      3  where  contains
      4             (csv.nhm_field_asset_description,
      5              pic_lib_keywords.term) >0
      6  /
    TERM
    cat
    1 row selected.
    SCOTT@orcl_11gR2>

  • Retrieving multiple values from one column in SELECT statement

    Hi,
    I have a slight dilemma in that I'm trying to pull down all the values from a column from a select statement that includes some JOINS in it.
    If I run the query at the SQL Plus prompt, it pulls back all the values/rows.
    When I run the select (and prepared ) statement in my JSP, it only pulls back one of the 4 values I'm trying to retrieve.
    e.g.
    at the DB level :
    SELECT role_name, CC_ID FROM votetbl a
    INNER JOIN APPROVERS b ON
    a.BUSVP = b.BUSVP AND
    a.BRANCH = b.BRANCH
    WHERE CC_ID = 1688this will return:
    ROLE_NAME CC_ID
    ops 1688
    ops 1688
    comply 1688
    legal 1688
    comply 1688
    When run in my JSP, like so:
    String primID3a = request.getParameter("primID");
    Statement stmtovoter = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    String prepvotSQL = "SELECT role_name, CC_ID FROM votetbl a INNER JOIN APPROVERS b ON a.BUSVP = b.BUSVP AND " +
                         "a.BRANCH = b.BRANCH WHERE CC_ID = ?";
    PreparedStatement prepvotstmt = connection.prepareStatement(prepvotSQL);
    prepvotstmt.setString(1, primID3a);
    ResultSet rest3 = prepvotstmt.executeQuery();
    rest3.next();
    String votecat = rest3.getString(1);
    out.println("Vote category: "+votecat);I only get ops returned.
    Do I need to run an enumerator? Or reqest.getParameterValues or use a while statement around the results set?
    Any feedback and direction here is welcomed!
    Thanks!

    Actually, I tried looping and still only get 1, but returned several times.
    i.e.
    PreparedStatement prepvotstmt = connection.prepareStatement(prepvotSQL);
    prepvotstmt.setString(1, primID3a);
    ResultSet rest3 = prepvotstmt.executeQuery();
    rest3.next();
    String votecat = rest3.getString(1);
    while (rest3.next()) {
    out.print("category roles "+votecat);
    }then I get returned the following:
    admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admincategory roles admin
    like so.
    Where as at the DB level I get
    ROLE_NAME CC_ID
    admin 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    ops 1688
    risk 1688
    comply 1688
    legal 1688
    legal 1688
    ops 1688
    comply 1688
    Maybe the while should go around the getString(1) designation? But I was thinking I'd tried that and gotten invalid cursor error
    Something is definitely amiss, between the prepared statement in the servlet and the SELECT statement at the DB level.
    I can totally hardcode the statement in the servlet or JSP and it will return one value potentially several times, but only one.
    Other times, it will not return a value at all, even though one resides in the db.
    Yet go to the DB/SQL Plus prompt and it returns perfectly. I can simply copy and paste the SELECT statement from the out.print line I made and it works like a champ in SQL Plus. Any ideas why the same exact thing cannot return the proper values within the servlet/JSP?
    Yeeeeeeesh!!! : (
    Message was edited by:
    bpropes20

  • Restrict filter values that are shown in the selection screen

    Hi Experts
    1) Is it possible to restrict the filter values that are shown in the selection screen in BEx web? When a user are asked to enter a material number and uses the selection button in BEx web, he should only see material numbers for one specific plant. How is this done? 
    2) Is it possible to remove the selection button for å characteristic filter in the selection screen in BEx web? The selection button I am talking about is the button to the right of where you enter the filter value (two white papers on top of each other). If there is no solution for question 1 we have to go for question 2 solution.
    We are using BI 04s, SP 09.
    Kind regards
    Erik

    Hi Erik,
    It seems that you would like the user to see value for 1 single plant. If the Plant Value is fixed then you can use this value in the Query and hardcode it.> in the query go to the Plant Chrac and keep a constant value of the Plant.
    How ever if you need this value to be dynamic then use a variable for customer exit and populate this value using ABAP.
    Regards,
    Jasprit

  • Collecting data from multiple rows into one column

    I'd like to run a query and put a collection of items into one output column instead of multiple rows. See the example below:
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE     10.2.0.5.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
         CREATE TABLE "SKIP"."INGREDIENTS"
       (     "INGRED_ID" NUMBER,
         "INGRED_NAME" VARCHAR2(20 BYTE),
         "STORES" VARCHAR2(20 BYTE)
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" ;
    REM INSERTING into SKIP.INGREDIENTS
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (1,'SEA SALT','Food lion');
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (2,'TABLE SALT','Food lion');
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (3,'FLOUR','Piggly Wiggly');
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (4,'YEAST',null);
    Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (5,'BEER','ABC Store');
      CREATE TABLE "SKIP"."PRETZELS"
       (     "PRETZEL_ID" NUMBER,
         "PRETZEL_NAME" VARCHAR2(20 BYTE),
         "PRETZEL_DESC" VARCHAR2(100 BYTE)
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" ;
    REM INSERTING into SKIP.PRETZELS
    Insert into SKIP.PRETZELS (PRETZEL_ID,PRETZEL_NAME,PRETZEL_DESC) values (1,'CLASSIC','Classic knot pretzel');
    Insert into SKIP.PRETZELS (PRETZEL_ID,PRETZEL_NAME,PRETZEL_DESC) values (2,'THICK STICK','Straight pretzel, abt 1/2" in dia');
      CREATE TABLE "SKIP"."INGRED_XREF"
       (     "PRETZEL_ID" NUMBER,
         "INGRED_ID" NUMBER
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS" ;
    REM INSERTING into SKIP.INGRED_XREF
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (1,1);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (1,2);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (1,4);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (2,2);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (2,3);
    Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (2,5);
    --  Constraints for Table INGRED_XREF
      ALTER TABLE "SKIP"."INGRED_XREF" MODIFY ("PRETZEL_ID" NOT NULL ENABLE);
      ALTER TABLE "SKIP"."INGRED_XREF" MODIFY ("INGRED_ID" NOT NULL ENABLE);
    {code}
    Desired output (note how the ingredients are all listed in one column, separated by commas):
    {code}
    PRETZEL_ID PRETZEL_NAME     PRETZEL_DESC                        INGREDIENTS
    1          CLASSIC          Classic knot pretzel                SEA SALT, TABLE SALT, YEAST
    2          THICK STICK      Straight pretzel, abt 1/2" in dia   TABLE_SALT, FLOUR, BEER

    See the FAQ : {message:id=9360005}
    Especially links concerning string aggregation.

Maybe you are looking for

  • Project 2013 - entering work hours at a monthly level

    Hi all,  Any help with this 'hopefully small' problem will be hugely appreciated. It's not so much a problem, but me still being new to Project - sorry! As a summary of what I am working with: I have entered a list of tasks (all set to Manually Sched

  • Print from windows 8.1 to laserjet 4650

    Having problems setting up an hp colour laserjet 4650 to my new windows 8.1 computer. The connections are OK, when the printer is on the driver comes up in the devices folder  automatically but when I print it comes us with an error, When I check thr

  • UTFDataFormatException and StreamCorruptedException

    We have an applet client that is communicating with a servlet in Apache Tomcat through HttpUrlConnection using ObjectOutputStream / ObjectInputStream. Everything has been working fine, but recently one of our users has had some serious problems with

  • Max number of pages in a spool

    Hi Gurus, I have a background job which takes an input file from app server.Input file has 50000 records.I need to process them inside the program and display the result in spool.Now,my question is ,will I be able to see all the records.is there any

  • [N95] "0" key doesn't work

    Hi. I have a problem: my "0" key stopped working. It wasn't working yesterday evening. Today morning it has been working for 10 minutes, then it stopped. Help me, please. What happened? Please, help. jwitos