Need to create a vertical view from horizontal table w/delimited column

I would like to create a vertical view frm a table that has a colon delimited column.
I can get a single row to work. I need the level to reset to 1 when the row changes.
any Ideas? the key to the table is: sos,nr,prgm_cd,mth
here is my select for a single row w/where clause removed:
SELECT SOS,NR,PRGM_CD,trunc(sysdate-(30*LEVEL) , 'mm') MTH,
ADD_MONTHS(trunc(sysdate,'q'),-3*LEVEL) QTR,
SUBSTR(qty,
INSTR(qty,':',1,LEVEL) +1,
INSTR(qty,':',1,LEVEL+1) - INSTR(qty,':',1,LEVEL)-1) QTTY
FROM (SELECT SRC_SUPL_CD SOS,APPL_PRGM_DESIG_NR,TYP_PRGM_CD,':'||PAST_PRGM_QY||':' qty from
rssp_api_master )
CONNECT BY LEVEL < LENGTH(qty) - LENGTH(REPLACE(qty,':'))
ex. data
sos nr prgm_cd qty
aaa 3 xx 1:2:3:4:5:5
bbb 3 xx 9:10:11:12:13
need to look like this
aaa 3 xx 1
aaa 3 xx 2
bbb 3 xx 9
bbb 3 xx 10
bbb 3 xx 11

See this thread
Re: rows into column
Nicolas.

Similar Messages

  • Hi, we need to create the test environment from our production for oracle AP Imaging. we have soa,ipm,ucm and capture managed servers in our weblogic. can anyone tell me what is the best way to clone the environment, can I just tar the weblogic file syste

    Hi, we need to create the test environment from our production for oracle AP Imaging. we have soa,ipm,ucm and capture managed servers in our weblogic..
    Can anyone tell me what is the best way to cloning the application from different environment, the test and production are in different physical server.
    Can I just tar the weblogic file system and untar it to the new server and make the necessary changes?
    Can anyone share their experiences and how to with me?
    Thank in advance.
    Katherine

    Hi Katherine,
    yes and no . You need as well weblogic + soa files as the database schemas (soa_infra, mds...).
    Please refer to the AMIS Blog: https://technology.amis.nl/2011/08/11/clone-your-oracle-fmw-soa-suite-11g/
    HTH
    Borys

  • How to create a maintainance view for a table.

    Hi All,
    Can anyone explain me how do we create a maintainance view for a table?
    Also, what access is required to create the view.
    Is it true that for SAP tables we cannot create a maintainance view?
    Appreciate any help on this.

    Hi
    Can anyone explain me how do we create a maintainance view for a table?
    <i>
    You can use the SE11 menu option 'Utilities-->Table Maintenance Generator' or you can use transaction SE54.</i>
    also check
    <i>http://help.sap.com/saphelp_nw04/helpdata/en/38/81c1351181b73fe10000009b38f839/frameset.htm</i>
    http://help.sap.com/saphelp_nw04/helpdata/en/38/81c1351181b73fe10000009b38f839/frameset.htm
    Regards
    krishna
    <i>Note: Award Points if helpful. Thanks</i>

  • Creating a "Print View" of a Table on Another Sheet

    Hi-
    I would like to create a "print view" of a table on another sheet that already has reorganization filters applied to it.  There is a template in Numbers called "Employee Schedule" that has exactly this, where the "printable" table's cells simply reference every cell in the source table on the other sheet.
    I know there is a way to very quickly (i think with a dragging motion), create the references in each cell in one or two operations, as opposed to going to each individual cell and typing in the reference to the source table.  I saw a post about how to do this a while back but cannot seem to locate it again
    How do I do this?  Thanks again for everyones help ;-)
    Thanks
    Matt

    mattford1 wrote:
    Hi-
    Re-reading this, I don't think this answered my question.  I understand how to reference a single cell, but how do you reference an entire table easily without having to go to each cell.
    Thanks
    Matt
    Matt,
    Select the first cell by clicking once on it, such that the border is highlighted. Then grab the little circle in the lower right corner of the border and drag it to the end of your table, either right or down. You can use this method to fill down or to the right. Sometimes it can be fussy, and if it refuses to behave, then you can use the alternate method, Copy and Paste. Click once on the first cell and Command-C. Shift-click the last cell and Command-V.
    Jerry

  • I need to add a single field from with_item table . need to write select query with reference to company code , account doc no , fiscal year

    I need to add a single field from with_item table . need to write select query with reference to company code , account doc no , fiscal year

    Hi Arun ,
    Can you explain little bit more ??
    what is account doc no? 
    what are the transactions should be displayed in your output??
    -Rajesh N

  • HOW CAN I CREATE A VIEW FROM SAME TABLE WHERE I NEED COLUMNS DETAILS FROM DIFFERENT ROWS IN THE SAME TABLE

    i have a table1 on the top, but i want to create a view from table 1 as  view mentioned beneath the table 2. Could any of you please help me.
    table1
    ID
    office
    employee
    activity
    1
    246
    -9999
    698
    2
    ##-99
    21480
    698
    3
    104
    -9999
    7025
    4
    ##-99
    88908
    7025
    5
    108
    -9999
    2415
    6
    ##-99
    17135
    2415
    7
    246
    -9999
    698
    8
    ##-99
    21480
    698
    9
    104
    -9999
    7025
    10
    ##-99
    88908
    7025
    11
    108
    -9999
    2415
    12
    ##-99
    17135
    2415
    view
    ID
    office
    ID1
    employee
    activity
    1
    246
    2
    21480
    698
    3
    104
    4
    88908
    7025
    5
    108
    6
    17135
    2415
    7
    246
    8
    21480
    698
    9
    104
    10
    88908
    7025
    11
    108
    12
    17135
    2415

    declare @forumsTable table (ID int, officeID int, employeeID INT, activityID int)
    insert into @forumsTable (ID, officeID, employeeID, activityID)
    values
    (1 ,246, -9999, 698 ),
    (2 ,-99, 21480, 698 ),
    (3 ,104, -9999, 7025),
    (4 ,-99, 88908, 7025),
    (5 ,108, -9999, 2415),
    (6 ,-99, 17135, 2415),
    (7 ,246, -9999, 698 ),
    (8 ,-99, 21480, 698 ),
    (9 ,104, -9999, 7025),
    (10 ,-99, 88908, 7025),
    (11 ,108, -9999, 2415),
    (12 ,-99, 17135, 2415)
    select f1.ID, f1.officeID, f2.ID as ID1, f1.employeeID, f1.activityID
    from @forumsTable f1
    inner join @forumsTable f2
    on f1.activityID = f2.activityID
    and f1.officeID > 0
    and f2.employeeID > 0
    and f1.id - f2.id = -1
    You really need to improve the relationship here.
    Perhaps you could make office and activity an exclusive pair.

  • Can't access object created in the view from controller

    Hi
    In the view, I create a simple HTML control with a DIV tag.I need to access the DIV tag from the view.  The function this.getView().byId() returns nothing.
    view
    createContent : function(oController) {
                            var aControls = [];
                            var html = new sap.ui.core.HTML(
                                        content : "<div id='obj1' style='width: 300px; height: 200px;'></div>"
                            aControls.push(html);
                            return aControls;
    controller
    onInit: function() {
    this.getView().byId("obj1");
    Thanks.

    Hi Chen,
    The reason for this is the at
    this.getView().byId("obj1") would only work for XML views
    but for JS views
    sap.ui.getCore().byId('obj1') would work
    The difference between JS views and XML views is that the id's on DOM are different for JS view each control would get the same id as used in the definition but for XML views the id would get generated.
    Hope this helps.
    Thanks and Regards, Venkatesh

  • How to create a normal view from the RDF sparql query?

    Hi,
    I am trying to create a view from the below query.
    select id, name from table(SEM_MATCH('
    (?id rdf:type dm:Conceptual_SMA_Information_Group)
    (?id dm:hasConceptualSmaInformationGroupName ?name)',
    SEM_Models('nyc_sma_curr'), null,
    SEM_ALIASES(SEM_ALIAS('dm','http://www.cdse.com/sbip/dwh/mdm/data_modeling#')), null))
    order by name,id;
    I am trying the below syntax to create a viewa but its giving the error and m unable to create view.
    create view Information_Group as
    select id, name from table(SEM_MATCH('
    (?id rdf:type dm:Conceptual_SMA_Information_Group)
    (?id dm:hasConceptualSmaInformationGroupName ?name)',
    SEM_Models('nyc_sma_curr'), null,
    SEM_ALIASES(SEM_ALIAS('dm','http://www.cdse.com/sbip/dwh/mdm/data_modeling#')), null))
    order by name,id;
    Error: ORA-00600: internal error code, arguments: [17046], [0x46E62D720], [0x46F2485F0], [1], [], [], [], [], [], [], [], []
    Please help me to create a view.
    Let me know if you need more details.
    Regards,
    Kavitha.

    Hi,
    This is a known issue in 11.1 (RDBMS Bug 6688356).
    Please contact Oracle Support to get the patch for this bug. Alternatively, you can upgrade to release 11.2.
    Thanks,
    Matt

  • Creat View from Multiple tables , Multiple Select

    Hello  Everyone ,
    I have a question and am not sure if this the correct forum to post it .
    I have two table studentTable and CourseTable which is each student  take more than one course . 1:M
    for example Student1 take 2 courses (C1 ,  C2).
    Student2 take 3 courses (C1,C2, C3).
    I need to create a table/View that contain student information plus all the courses and the score for each  course in one row.
    for example
    Row1= Student1_Id ,C1_code ,C1_name  ,C1_Score ,C2_code,C2_name ,C2_Score
    Row2=
    Student2_Id,C1_code,  C1_name,C1_Score,C2_code ,C2_name ,C2_Score ,  C3_code,C3_name,C3_Score
    and since Student 1 just took two courses  , I  should enter NULL in 'Course 3 fields'
    My Struggle is in the insert  statement
    I tried the following but it show an error
    Insert Into  Newtable
    ( St_ID, C1_code,c1_name, C1_Score ,C2_code  ,C2_name,C2_score,C3_code ,C3_name,C3_score)
    Select
    (Select St_ID from  StudentTable)
    (Select C_code,c_name,c_Score
    from  Coursetable,SudentTable
    where course.Stid =Studet.stid)
    (Select  C_code,c_name,c_Score
    from course ,student
    where course.Stid =Studet.stid  ),
    (Select C_code,c_name,c_Score
    from course ,student
    where  course.Stid =Studet.stid );
    I'm fully aware that the New table will break  the rules of normalization ,but I need it in this way for specifc purpose.
    I tried  also the PIVOT BY functionality but no luck with it .
    FYI , I'm not  expert in using SQL Syntax , I just know the basic.
    I will be great full for  any helpfull suggestions to try ,
    thank you very  much.

    First Table is Member table which Represent
    Students Information
    .The fields in this table are
    member_sk (PrimaryKey), full_or_part_time, gender, age_at_entry, age_band_at_entry, disability, ethnicity,
    widening_participation_level, nationality
    Second Table is Modules table which include
    the Courses' scores that Student took .
    The fields in this table are
    Module_result_k(Primary Key), member_sk(Foreign key to connect to Member table), member_stage_sk
    ,module_k(Foreign key to connect to Module table), module_confirmed_grade_src, credit_or_result
    Third Table is
    AllModuleInfo which is include
    general information for each course .The fields in this table are
    Module_k (Primary key), module_name ,module_code, Module_credit, Module stage.
    The New table
    that I will create has the following fields
    member_sk (PrimaryKey), full_or_part_time, gender, age_at_entry, age_band_at_entry, disability, ethnicity,
    widening_participation_level, nationality 
    " This will be retrieved from Member table"
    Also will include
    Module 1_name ,module1_code, Module1_credit, Module1_ stage, member1_stage_sk
    , module1_confirmed_grade_src, credit1_or_result
    Module 2_name ,module2_code, Module2_credit, Module2_ stage, member2_stage_sk
    , module2_confirmed_grade_src, credit2_or_result
    I will repeat this fields 14 times which is equal to Maximum courses number 
    that any of the students took.
    //// I hope now my questions become more clear

  • Creating a Materialized View from different agregate queries

    I want to create a materialized view. The problem is that doing so can get sticky. The view should have one row, with each column representing the return of an aggregate function on the base table. Here is a query that returns this kind of result:
    select
         (select count(rowid) from pasta) "PASTA_ROWS",
         (select count(salt) from pasta where salt='F') "SALT_IS_FEMALE_ROWS"
    from dual;
    You can see that by selecting the subqueries from dual, I get the return to be in seperate columns. The problem is that when I try creating a Materialized view, I get an error.
    ERROR at line 8:
    ORA-22818: subquery expressions not allowed here
    So, is there a simple SQL query that will return the values I am asking for, in seperate columns, but will not make the materialized view produce an error?
    Thanks,
    Edward
    For your reference, here is a describe of the pasta table:
    SQL> desc pasta
    Name Null? Type
    CHEESE NUMBER(4)
    TOMATO VARCHAR2(20)
    SALT VARCHAR2(1)
    OREGANO VARCHAR2(20)
    OLIVE_OIL VARCHAR2(40)

    Edward:
    Something like this should work:
    SELECT COUNT(*) PASTA_ROWS,
           SUM(DECODE(salt,'F',1,0)) SALT_IS_FEMALE_ROWS
    FROM pastaTTFN
    John

  • Need to create a message INVOIC from transaction MIRO

    Hy,
    try to find an answer on following prob.
    I need to send the billing information from transaction MIRO to another system. They want to have a INVOIC02. I know how to create a message but i have not found a solution (wich function) to create a INVOIC02 with all information.
    Any help ?? Is there another solution or do i have to develop the filling of the IDOC ?
    Thanx
    Jens

    Hi again,
    thanx for the answers. Helpful but not solving my prob. Perhaps i have to describe a little bit more.
    My prob is not to create the IDOC. I can handle that. My problem is to find the right function to fill that IDOC.
    On transaction M806 i have created a new Output type. But i do not know wich Processing Routine i have to use to fill the IDOC INVOIC02. I tried the Program RSNASTED and the the Form Routine ALE_PROCESSING.
    Now the whole settings i made :
    TA M806
    New type : Ytcm
    Program :    RSNASTED
    Form Routine : ALE_PROCESSING
    TA WE81
    New message type : YTCMS2
    TA WE82
    New message type : YTCMS2
    Basic type :                INVOIC02
    WE20
    Partner LS
    Outbound : 
    Message type :  YTCMS2
    Basic type  :  INVOIC02
    Message control
    Application :   MR
    Message type :  YTCM
    Process code : SD09
    With that settings i create the IDOC but this is not filled with the information of the billing (Transaction MIRO).
    So i think perhaps the process code or the settings in TA M806 a not right.
    Thanx again for helping me.
    Regards
    Jens

  • Need to create an edit Page from a Multiselect List

    I make one or more selections of values from a Multiselect List; I need to branch to another page in which I display all of the selected List items and two other columns (per item) that can be edited; i.e., this second page will look like one or more rows consisting of (1) List item, (2) value1 from a Table, (3) value2 from a Table. I need to be able to change value1 and/or value2 for any or all of the rows and have those changes reflected in the Database. (The List item is display only).
    My question is: which construction wizard can I use for this second page? I can collect my List items in a PL/SQL Table, but how can I display them and their related columns so the column values are editable?

    Thanks for the reply. I understand how to create Collections with the values I need to display and modify; however, I'm unsure which construction Wizard to employ to launch the Page ("Form based upon a Procedure", etc.)
    I looked in the Tutorials for a "collection demo" and found these potential candidates: "Build an Issue Tracking System", "Create a Simple Survey Application", and "Serving Application Express Reports". Is it one of these? If not, please tell me where I can find the "collection demo". Thanks.

  • Need access to the user view from a form

    How can I get access (only need read access) to the user view from inside a form, in this case, the Question Login Form?

    This is mentioned in the forum somewhere:
    <invoke name='getView'>
    <ref>:display.session</ref>
    <concat>
    <s>User:</s>
    <ref>accountId</ref>
    </concat>
    <map>
    <s>authorized</s>
    <s>true</s>
    </map>
    </invoke>
    regards,
    Manish Gurnani

  • Create a view from 10 tables

    Hi Experts,
    I want to create a view from 10 pricing tables rather than write 10 different select query in my application. Most of the columns of the pricing tables are same. I want all the data from these tables into the respective columns. Further I want an indicator as to which table does this record belong to. How can I achieve this?
    Ex:
    Table 1 columns: kappl kschl vkorg vtweg vkgrp
    Table 2 columns: kappl kschl vkorg vtweg matkl matnr
    if each table has two records, I want 4 records in my view in the respective columns along with the indicator that this record belongs to a specific column.
    Regards

    Hi,
    Placing 10 tables in one view will drastically affect performance. This is highly unrecommended.
    Anyhow if you insist on doing so you can create [database view|http://help.sap.com/saphelp_nw04/helpdata/en/36/74c0358373003ee10000009b38f839/frameset.htm] or use explicitly joins in your program.
    Keep in mind that althought it is possible to use projection (only selection of choosen column) it is not logically appropriate to locate which table this column belongs to (as far as we are talking about key fields) as both have the same field as key field.
    On the other hand when using projection for non-key columns it is you who define what is to be selected and how, therefore you know which column belongs to which table.
    i.e
    data: begin of st,
              lgart type t512w-lgart,
              molga type t512w-molga,
              lgtxt   type t512t-lgtxt,
            end of st.
    select w~molga w~lgart t~lgtxt   "<- here using aliases you know which column is taken from which table
      into st
      from T512W as W
      inner join T512T as T on
         W~LGART = T~LGART.
      write: / st-lgart, st-molga, st-lgtxt.
    endselect.
    In this example lgart (key field) can be taken from either t512w or t512t, but fields mogla and lgtxt are taken from t512w and t512t respectively.
    All in all this is correct as far as up to 3-4 tables are concerned. But 10 will be a disaster...
    Hope this helps you
    Marcin

  • Need to create 'Characteristics' using data from legacy system

    Hi All,
            I need to create the 'Characteristics' in SAP using the data from legacy application. The allowable values list defer between characteristics.
    1) which upload tool & method I can use?
    Thx,
    Gopi

    no problem, lsmw is fine to read from text files, you can define the path & format in step 'Specify Files'
    Message was edited by:
            Harris Veziris

Maybe you are looking for

  • Windows 8 Upgrade Assistant failed on Satellite P775

    I tried running the Windows 8 Upgrade Assistant on my Satellite P775. It started by displaying Checking Components; download Windows 8 Components data. Reading Components. Got component TOSHIBA Wireless LAN Indicator ... etc ... Got Component TOSHIBA

  • New Mac laptop and Illustrator CS3

    I tranferred over Illustrator to my new laptop and when I try to open it, this is what I get... You cannot use this product at this time. You must repair the problem by uninstalling and then reinstalling this product or contacting your IT administrat

  • ORA-06508 PL/SQL: could not find program unit being

    Hi all, I'm having the following problem: I have a trigger that gets fired before update of a field. The trigger source code calls a function from a package. This function calls another function. When the trigger was executed I got the following erro

  • Excise trading in 1st stage

    Hi all My client owns a trading company. In 1st stage client purchases from manufacturer with excise which he passes to its customer later on during sale. so how to create tax code for passes excise to customer at the time of sale. How to handle purc

  • Bunch of questions for 2k+ video editing setup. Please help if possible

    Hello everyone, I'm in the process of building a desktop (mainly for video editing -- with some graphic design and gaming here and there). I'll be working with Canon 5D III raw footage (Magic Lantern) and typical dslr h.264 for the time being. Eventu