Adding columns in PIVOT

Hi,
Using Pivot query i have generated Process in below format.
RefNo
Part
Process1
Process2 
Process3
1
A
20
15
15
2
B
10
10
10
3
B
5
5
5
4
c
10
9
9
5
b
20
19
19
I want to add Start time and End time for each Process. Like
RefNo
Part
Process1
Starttime
Endtime
Process2 
Starttime
Endtime
Process3
starttime
endtime
1
A
20
15
15
2
B
10
10
10
3
B
5
5
5
4
c
10
9
9
5
b
20
19
19
Any idea ?
raghu

you can use like this
SELECT refNo,Part,
MAX(CASE WHEN Process = 'Process1' THEN Process END) AS Process1,
MAX(CASE WHEN Process = 'Process1' THEN StartTime END) AS Process1StarTTime,
MAX(CASE WHEN Process = 'Process1' THEN EndTime END) AS Process1EndTime,
MAX(CASE WHEN Process = 'Process2' THEN Process END) AS Process2,
MAX(CASE WHEN Process = 'Process2' THEN StartTime END) AS Process2StarTTime,
MAX(CASE WHEN Process = 'Process2' THEN EndTime END) AS Process2EndTime,
FROM Table
GROUP BY refNo,Part
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • How to increase the the max limit column in pivot view in BIEE 11G?

    Hi Experts,
    How to increase the the max limit column in pivot view in BIEE 11G?
    When the number of column exceed 256 in pivot view, it will generate the following error message as below:
    Exceeded configured maximum number of allowed output prompts, sections, rows, or columns.
    Error Details
    Error Codes: IRVLJWTA:OI2DL65P
    Location: saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool.socketrpcserver, saw.threads
    SQL Issued: 13678~vid1ptgt0v5ubh39gesnauuhl6
    For example:
    ----------------Day
    Country-----20120101---20120102---..........20121231
    China--------10000---------20000----......

    Try increasing the Max Rows in Instanceconfig.xml
    Path:-Middleware\instances\instance1\bifoundation\OracleBIPresentationServices\instanceconfig.xml
    <ServerInstance>
    <Views>
    <Pivot>
    <MaxVisibleColumns>300</MaxVisibleColumns>
    <MaxVisiblePages>1000</MaxVisiblePages>
    <MaxVisibleRows>500</MaxVisibleRows>
    <MaxVisibleSections>25</MaxVisibleSections>
    <DefaultRowsDisplayed>30</DefaultRowsDisplayed>
    </Pivot>
    </Views>
    </ServerInstance>
    Try adding this in the config file and restart the services.
    Mark as correct if it is helpful.
    Thanks.

  • Calculation on two columns in pivot table

    Hello all,
    I have a view:
    Dept Year Amount
    Accounting $500 2010
    Accounting $700 2011
    Engineering $100 2010
    Engineering $600 2011
    and etc
    pivot table:(data displayed side by side)
    Dept: 2010 2011
    Accounting $500 $700
    Engineering $100 $600
    Is there a way in pivot table to create additional column and do a calculation on that column? New column called 'Change' (actual calculation amount of 2010 minus amount of 2011 per each department). I see the feature which allows to duplicate the columns in pivot table. But this is it... no additional calculations.
    Thank you in advance,
    Sonya

    Deepak,
    My "YEAR_NO' is already in the column area. Once I created 'calculated column' and entered formula '2011'-'2010' I got what I needed.
    Thank you very much for the solution.
    Sonya
    In my view I also have column called EXPENSE. When, I added the 'calculated column' to 'YEAR_NO' with formula '2011'-'2010'. It created two calculated columns 1) after the EXPENSES and the other one after YEAR_NO. Is there a way to be specify to display the DIFFERENCE only once after the YEAR_NO??
    Edited by: user8461308 on Dec 20, 2011 7:44 AM

  • Stock Requirement List - MD04 - adding columns in this list

    Dear All,
    I am working on the Stock Requirement list ( transactioncode MD04) and the customer wants to add columns with the fields STPO-DATUV ,date of change of a drawing, and the drawing number with revision level STPO-YY_DZEINR.
    There is a badi MD_ADD_COL_EZPS which provides in adding columns, but according the structures MDPSX , MDEZX and MDSUX there are no fields in thoser structures, which directly match with the required fields; somebody has a clue to help me out and get it working.
    For instance: Vendor- and Customer data  can be added by using the pushbuttons and those fields are available from above mentioned structures.
    Thanks in advance and kindest regards,
    Rene.

    Hi Utpal Mishra
    You guessed correctly. I missed to inform our Strategy. We are using Strategy group  11  Make-to-stock prod./gross reqmts plnning.
    User is not able to do PGI or create delivery. He says I have enough stock in MMBE but why system is not allowing.
    Here there are some pending document like -
    1. Pending sales order
    2. Pending deliveries (picking not done)
    2. Delivery created & Picking Done but PGI not done. These things will have a commitment against the stock. But we are interested in getting these document numbers, so that we can take come action against them.
    MD04 simply shows the mrp element as order / delivery but the document number is not available. How to find these documents.
    Please help. Is there any table or a standard transaction ??
    Thanks

  • Adding Columns to the matrix in SAP B1 user form using Visual studio 2010

    Hi,
    Using Visual studio 2010, I have created a SAP B1 user form( b1f ) with one matrix.Matrix is having 5 columns. Its working properly. Later, I want to add few more columns. Then I added columns to the matrix as I have created columns initially. But, it does not saves.
    i.e, Whenever I run, In B1 I could see only old columns. Newly created columns are not showing.So, I closed the .net project and opened again. Created columns are not showing in visual studio b1f itself. So, I created again and saved. But, its not saving.I tried it many times.
    What I am missing?
    Any help is appreciated.
    Thanks in advance,
    Parvatha Solai.N

    Hi Parvatha,
    Are you using B1 Studio? Anyway try to clean the solution first then rebuild it. This would re-copy files to the output directory, that contain your changes.
    Best regards,
    Pedro Magueija

  • When adding columns, why do I get overrides on style?

    Hi all,
    When I'm adding columns in a certain document I end up with the new columns having overrides on them. How can I avoid this?
    The columns I added are seen in the middle.
    As you can see the they all get a "shift down" by -22 pt.
    I use this shift down on some other place in the document, but the table columns are clean from that kind of override, and just by selecting a column and adding 4 new columns "to the right" of that column, I would expect the new ones to get the exact same properties as the one selected.
    Can anyone try to explain what might be wrong with my document or way of working?
    Adding info: It seems there's something in the styles - many properties on them... This has noting to do with cells specifically. Just adding a textbox results renders the text this way as well, with the baseline shift (only no override symbol).
    Best regards,
    Andreas

    Ah... now I get it. The default styles of the document were set to a specific paragraph style and another character style.
    Setting the defaults to [Basic Paragraph] and None respectively seems to put everything in order.
    (You set a default by clicking outside the document so that nothing is selected, and then you select the styles [Basic paragraph] and None)
    Case closed.

  • Discoverer 10.1.2 does not refresh new added column

    Hello,
    I need help to add a new item to EUL Business Area folder for a new added column in the database table.
    When I refresh the folder in the BA EUL, the result shows no difference between the folder and the underlying table in the database; however, when I quey the table in the database, a new column is there. The refresh of the folder in the Discoverer Admin tool cannot find the newly added column. Weird!! The first time saw this problem.
    Could someone shine some light on it? Would be really appreciate it!
    Ping

    I have a slightly different problem and can't solve it! When I refresh the EUL, the result shows the differences between the folder and the underlying tables in the database. However, it does not refresh the EUL in Discoverer Administrator 10g. Nothing happens! When I try to refresh again, the same list is shown... Does anyone know what could be happening?
    Thanks

  • How to extend No. of columns for PIVOT table in BI Publisher Desktop

    Hello Everyone,
      I am using the Oracle BI Publisher Desktop to design the TEMPLATE for Oracle Reports.
    I need to create the PIVOT table .In my PIVOT table I need to display 9 columns but when I tried to create PIVOT table by dragging 9 columns only first 4 columns are displaying in report.
    Can anyone suggest me how can I increase the number of columns in PIVOT table?
    Thank You.
    Regards,
    Guru.

    hi jim
    if you carefully look inside the form field's you will find the logic of sort . if you remove that you will get the data without any sorting order.
    else send me your template and xml to my email id i can look into that .
    email : [email protected]

  • How to get added columns in the after DDL trigger?

    As title, I want to get information, like name/type/.., about the added columns by sql statement "alter table *** add (***)" in the after ddl trigger. But looks like dba_tab_columns view doesn't include the added columns.
    Thanks

    Hi
    Hi try other versions of the trigger like
    create or replace trigger addl_trigger
    after alter on schema
    declare
    TYPE attrs_cur IS REF CURSOR;
    m_cur attrs_cur;
    m_event varchar2(50);
    m_user varchar2(50);
    m_owner varchar2(50);
    m_user1 varchar2(50);
    m_type varchar2(50);
    m_name varchar2(50);
    m_column varchar2(50);
    m_cnt NUMBER;
    m_stmt varchar2(512);
    number_of_modified_objects BINARY_INTEGER;
    t ora_name_list_t;
    begin
    m_event:=ora_sysevent;
    m_user:=SYS_CONTEXT('USERENV','SESSION_USER');
    m_user1:=ora_login_user;
    m_owner:=ora_dict_obj_owner;
    m_type:=ora_dict_obj_type;
    m_name:=ora_dict_obj_name;
    if (m_type='TABLE' and m_event='ALTER')
    then
              execute immediate 'select count(*) from dba_tab_columns where owner=:1 and table_name=:2' into m_cnt
              using m_owner,m_name;
              insert into log values (m_cnt);
              dbms_output.put_line('->'||m_cnt);
              OPEN m_cur FOR 'select c.name from sys.col$ c, sys.obj$ o, sys.user$ u where o.obj# = c.obj# and o.owner# = u.user# and u.name=:1 and o.name=:2' using m_owner,m_name;
              LOOP
                        FETCH m_cur INTO m_stmt;
                        EXIT WHEN m_cur%NOTFOUND;
                        insert into log values (m_stmt);
                        --dbms_output.put_line(m_stmt||'**************');
                        END LOOP;
    end if;
    but all versions continue to insert only the already existing columns. I think that Oracle actualize the dictionary first after this system event.
    Bye, Aron

  • SSAS Tabular - Adding Column to a table gives error "Object reference not set to instance of object"

    If I make changes to a table in SSAS Tabular Visual Studio, the newly added column gives error as "Object
    reference not set to instance of object"

    Hi VikasJain13,
    According to your description, you get the "Object reference not set to instance of object" error when adding columns in Tabular. Right?
    Generally, it throws this error when the internal code is accessing the property of an empty object. As you mentioned it happens when you make changes on a table, mostly it means that table is already a empty object. Please re-process your tabular to see
    if this table is still existing. 
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • Irritating problem with adding columns

    I am adding columns to jtable. And then moving it to required postion.
    But whenever I edit those columns all the newly added columns and the first column reflects those changes. ie whatever I enter in the new columns, it appears in all newly added columns and the first column as well.
    whats wrong I am doing here.
    EditableHeaderTableColumn ncol = new EditableHeaderTableColumn();
    TableColumnModel columns = table.getColumnModel();
    int c = table.getSelectedColumn();
    columns.addColumn(ncol);
    columns.moveColumn(i-1, c+1);

    Make sure you are not sharing the TableColumn instance or adding a TableColumn that already is in the TableColumnModel.
    When resizing the table column, do the others resize too. ?

  • Newly added column not displayed in Interactive report

    Hello,
    I have a tableA with 3 columns.In the application i am displaying as Form with Report region as Interactive report(Oracle 10g Application Express 3.2).
    I added one column to tableA.Now when i am refreshing the report by adding that column in the select query,the new added column is not displayed in the application.
    How can i do this so that the added column can be displayed.I dont want to delete the whole thing and redo it again.
    Thanks
    Siya

    Hi Siya,
    The Interactive Report will not show you the newly added columns by default. You have to select those columns from the actions menu and when all the required fields are displayed then save it as the default report.
    Then you will be able to see all the columns.
    Hope this solves your problem.
    Thanks,
    Satish.

  • How can we modify the maximum no. of columns in pivot table ?

    hi all,
    How can we modify the maximum no. of columns in pivot table ?
    do i need to change the nqconfig.ini or instanceconfig file or else?
    thnx..

    A little search on the forum :
    In the instanceconfig.xml add a <PivotView> element under <ServerInstance> if one does
    not exist already.
    Within the <PivotView> element add an entry that looks like:
    <MaxCells>nnnnnn</MaxCells>
    where nnnnnn is your desired limit for the maximum total number of cells allowed
    in a pivot.
    Warning: an excessively large number will cause more memory consumption and
    slower browser performance.The details here :
    Oracle BI EE (10.1.3.2): Maximum total number of cells in Pivot Table excee

  • Sorting is not showing in measure column in Pivot View

    Hi,
    We are not able to do sorting on Measure column in Pivot table.Tried in Criteria also but no luck.
    Any help in this regard.

    I'm going to take a guess since your question is very vague. If the column you are trying to sort on is, say, the fifth column and you want it to stay there, then do this: Make a copy of the column and drag the copy all the way to the left. Add the sort to it and then hide it. The pivot table should now be sorted the way you want.
    Try it.
    Sorry, the solution is not for "measures" but for dimensions in the "row" section of the pivot table. Didn't read it thoroughly. What I said won't help you in this case. My apologies.
    Edited by: David_T on Jul 20, 2009 7:59 AM

  • Rank on column-level Grand total column in pivot table  -  Need help

    Hi ,
    I have developed the report, which is having a pivot view. In pivot view i have a column level grand total. I need to apply the rank for the grand total column..
    will that be possible.. if possible let me know..
    Thanks
    Kishore

    MAY BE IT IS NOT POSSIBLE IN PIVOT VIEW< AS WE DONT HAVE FORMULA EDIT OPTION FOR COLUMNS IN PIVOT VIEW.......
    Thanks & Regards
    Rushi

Maybe you are looking for