In oracle 10 g, show data after doing a pivot

Hi,
i am using oracle 10g database. i have data like this in my table:
SP     CM     ON     CS     CM -- column Names
SP1     CM1     ON1     CS1     CM1
SP2     CM2     ON2     CS2     CM2
SP1     CM1     ON2     CS3     CM3
SP2     CM2     ON1     CS4     CM4
I have to display data like below:
SP     CM     ON1          ON2     
          CS     CM     CS     CM
SP1     CM1     CS1     CM1     CS3     CM3
SP2     CM2     CS4     CM4     CS2     CM2
as you can see the column data of "ON" (shown in the first table) is coming as column header in the second table. and under this each "ON" data i need to show CS and CM columns.
Also, i have taken here example for two "ON" ON1 & ON2 but it can be more based on the other datas in the table. like ON3 ...ON15
Thanks in Advance

Thanks for replying Robert.
But this solution will not work in my case as i will not be able to do the following
<SNIP>
and mt1.on = 'ON1'
and mt2.on = 'ON2'
</SNIP>
because i dont know what data is there in the table. the example i took was only for explanation. Also i dont need to get two CM columns as these are fixed values and i can hard code it in the front end. Main issue is the data in the header ON1 and ON2 etc.

Similar Messages

  • Why MSAccess database shows data but does not show columns and DDL in edit mode in jdeveloper?

    Sir,
    My developer ver is 12.1.3.0.0.
    I create a connection to MS Access database, this database shows data as bellow in jdeveloper databases window
    But when I open any table in Edit mode like bellow it does not show any columns and DDL and give an error like bellow
    Similarly when I try to create view objects on these tables then on data controls the view object also doesn't show any columns like bellow
    What could be the reason any help on this issue
    Should I use MS Access or not but I want to use ms access for very small databases.
    Regards

    If you look into the certification matrix at Oracle JDeveloper and ADF 12c (12.1.3) Supported Systems
    You'll see that ms access is not supported.
    You can use oracle xe which is free for your project.
    Timo

  • Probe Shows Data, Chart Does Not

    Hello,
    I have a while loop
    I am using a USB-6255 to output/input data and it works fine (see part A & B in picture)
    When I added code (see part C) to input temperature data from a NI-6213 a strange thing happened.
    The graphs stopped showing data where as all indicators and probes show the data just fine!
    The code for the temperature works fine alone
    Why is this happening and why only graphs/charts are influenced?
    Is there a problem using many acquisition devices in the same loop?

    Here is another picture.
    The text output is directly connected to the waveform graph
    I get data via text but there is nothing displayed on the graph
    Why is this happening?
    All the graphs in the vi do not work

  • Table not showing data after refresh

    Hi gurus ,
    A unique problem We have added a field in the custom table . once moved to quality system it is not showing up the data whwn when we do a select query on that table in se16 . say total entries are ten thousand four of them are checked and when display not checked i.e eq space we get just 100 entries on number of entries ..i asked to regenerate the table in quality system but it did not help .The Quality system was refresh 1 month ago and we see it not working after it ..please suggest the correct steps we need to perform  to recover the data . Adjust database with keep data has already been done ...

    Hi Anjaneya Bhardwaj,
    If I understand well, your issue is that you have a SELECT in your program, saying newfield is your newfield, something like:
    SELECT ... FROM ztable INTO ... WHERE newfield = space.
    and it doesn't return the records that existed in quality before newfield was added.
    It it because, by default, when you add a field to an existing database table, with records already present, they are assigned the NULL value, which is different from space.
    They can be retrieved using WHERE newfield IS NULL.
    Usually, to avoid this issue, when we add a new field, we tick the "no null value" checkbox for this new field, in SE11 transaction. That will initialize the field of existing records, to the initial value (space for characters, 0 for numeric fields, etc.) Note: maybe it can be counter performant for big tables...
    Solution for your issue, run this code once:
    UPDATE ztable SET newfield = space WHERE newfield IS NULL.
    BR
    Sandra

  • Problem getting correct data from MS Access after doing an Update

    Hi all,
    I have a problem getting correct data after doing an update. This is the scenario
    I am selecting some(Eg: All records where Column X = �7� ) records and update a column with a particular value (SET Column X = �c� ) in all these records by going through a while loop. In the while loop I add these records to a vector too, and pass it as the return value.
    After getting this return value I go through a for loop and get each record one by one from the DB and check if my previous update has actually happened. Since No errors were caught while updating DB, I assume all records are updated properly but my record set shows one after another as if it has not been updated. But if I open the DB it is actually updated.
    This does not happen to all records, always it shows like this
    1st record     Mode = �c�
    2nd record     Mode = �7�
    3st record     Mode = �c�
    4nd record     Mode = �7�
    9th record     Mode = �c�
    10th record     Mode = �7�
    I am relatively new to java and this is someone elses code that I have to modify,So I am not sure if there some thing wrong in the code too
    //Here is the method that gets records and call to update and add to vector
    public static Vector getCanceledWorkOrders() throws CSDDBException{
    //Variable declaration
      try {
        objDBConn = DBHandler.getCSDBCon();
        strSQL  = "SELECT bal bla WHERE [Detailed Mode])=?)";
        objStmt = objDBConn.prepareStatement(strSQL);   
        objStmt.setString(1, '7');
        objWOPRs = objStmt.executeQuery();
        while (objWOPRs.next()) {
         //Add elements to a vector by getting from result set
          //updating each record as PROCESSING_CANCELLED_WO(c)
          iRetVal = WorkOrderDetailingPolicy.updateRecordStatus(objPWODP.iWorkOrderNumber, objPWODP.strPersonInformed, EMSConstants.PROCESSING_CANCELLED_WO);
          if (iRetVal == -1) {
            throw new NewException("Updating failed");
      catch (Exception e) {
        vecWONumbers = null;
        throw new CSDDBException(e.getMessage());
      }finally{
        try {
          objWOPRs.close();
          objStmt.close();
          DBHandler.releaseCSDBCon(objDBConn);
        catch (Exception ex) {}
      //return vector
    //here is the code that actually updates the records
    public static int updateRecordStatus(int iWONumber, String strPerInformed , String strStatus) throws CSDDBException{
       PreparedStatement objStmt = null;
       Connection objDBConn  = null;
       String strSQL = null;
       int iRetVal = -1;
       try{
         objDBConn  = DBHandler.getCSDBCon();
         objDBConn.setAutoCommit(false);
         strSQL = "UPDATE Table SET [Detailed Mode] = ? WHERE bla bla";
         objStmt = objDBConn.prepareStatement(strSQL);
         objStmt.setString(1, strStatus);    
         objStmt.execute();
         objDBConn.commit();
         iRetVal = 1;
       }catch(Exception e){
         iRetVal = -1;
       }finally{
         try{
           objStmt.close();
           DBHandler.releaseCSDBCon(objDBConn);
         }catch(Exception ex){}
       return iRetVal;
    //Here is the code that call the records again
      public static WorkOrderDetailingPolicy getWorkOrders(int iWorkOrderNo) throws CSDDBException{
        Connection objDBConn = null;
        PreparedStatement objStmt = null;
        ResultSet objWOPRs = null;
        WorkOrderDetailingPolicy objPWODP = null;
        String strSQL = null;
        try {
          objDBConn = DBHandler.getCSDBCon();    
          strSQL = "SELECT * FROM [Work Order Detailing] WHERE [Work Order No] = ?";
          objStmt = objDBConn.prepareStatement(strSQL);
          objStmt.setInt(1, iWorkOrderNo);
           objWOPRs = objStmt.executeQuery();
          if (objWOPRs.next()) {
            objPWODP = new WorkOrderDetailingPolicy();
            objPWODP.iWorkOrderNumber = objWOPRs.getInt("Work Order No");
            //......Get Record values
        catch (Exception e) {
          objPWODP = null;
          throw new CSDDBException(e.getMessage());
        }finally{
          try {
            objWOPRs.close();
            objStmt.close();
            DBHandler.releaseCSDBCon(objDBConn);
          catch (Exception ex) {}
        return objPWODP;
      }

    Hello,
    Can you put an example of your problem online?
    Are you sure you're not having problems with case sensitive data?
    Thanks,
    Dimitri

  • Data source does not exist

    Dear all,
    am extracting the data from Vistex datasource,IRM/LIS_RM_IPCRASP               IP CR Agreement Conditions
    after activating in RSA5 i can able to see in RSA6
    but while activating the data source after the extract structure has successfully generated,
    the system showing data source does not exist
    plz help me

    hi,
    when i click the maintain button save button will appear,
    but in my case this save button not highlighting...
    when i check in ST22 the system proposed error mesage is table illegal statement,
    i found this error in many forums but its not related to datasource actvation,
    plz anyone giv me solution as soon as possible...
    regards
    Edited by: gadhatharan thirunavukkarasu on Oct 15, 2011 7:57 AM

  • Oracle Designer to SQL Data Modeller Migration

    Hi
    We would like to migrate our artifacts from Oracle Designer to SQL Data Modeller
    Does anybody here have experience with that and things that i should be aware of that is possible with Designer but need to be handled differently in Modeller.

    You might want to try this forum as well: SQL Developer

  • Oracle Development Survey on Data Warehouses: How Does Yours Compare?

    At the start of most data warehouse projects, or even during a project, I am sure you as customers try to find answers to the following questions to help you plan and manage your environments:
    * Where can I find trend and comparison information to help me plan for future growth of my data warehouse?
    * How many cpu's do other customers use per terabyte?
    * How many partitions are typically used in large tables? How many indexes?
    * How much should I allocate for memory for buffer cache?
    * How does my warehouse compare to others of similar and larger scale?
    The data warehouse development team, here at Oracle, would like to help provide answers to these questions. However, to do this we need your help. If you have an existing data warehouse environment, we would like to obtain more technical information about your environment(s) by running a simple measurement script and returning the output files to us, here at Oracle. This will allow our developers to provide comprehensive documents that explain best practices and get a better understanding of which features our customers use the most. This will also allow you as Customers, to benchmark your environments compared to other customers’ environments.
    From a Company perspective we are also interested to get feedback on features we have added to the database, are these features used, how are they used etc. For example we are keen to understand:
    * Which initialization parameters are most frequently used at what values?
    * How many Oracle data warehouses run on RAC? on single nodes?
    * Is there a trend one-way or the other, especially as data volumes increase?
    * Does this change with newer releases of the database?
    All results from these scripts will be held confidential. No customers will be mentioned by name; only summaries and trends will be reported (e.g., “X percent of tables are partitioned and Y percent are indexed in data warehouses that are Z terabytes and larger in size.” or “X percent of Oracle9i and Y percent of Oracle10g data warehouses surveyed run RAC”). Results will be written up as a summarized report. Every participating customer will receive a copy of the report.
    Terabyte and larger DW are the primary interest, but information on any data warehouse environment is useful. We would like to have as many customers as possible submit results, ideally by the end of this week. However, this will be an on going process so regular feedback after this week is extremely useful.
    To help our developers and product management team please download and run the DW measurement script kit from OTN which is available from the following link:
    http://www.oracle.com/technology/products/bi/db/10g/dw_survey_0206.html
    Please return the script outputs using the link shown on the above web page, see the FAQ section, or alternatively mail them directly to me: [email protected].

    969224 wrote:
    Hi Guys, just a quick question. when we have a primary key on 4 coloumns and we have, say 20 million rows and we want to add one extra row. How does oracle check whether the data on the primary key is unique to the record being added compared to the 20 million rows. Does it actually compare the record being added to all the rows present in the table?
    Edited by: 969224 on May 10, 2013 8:14 AMNot the whole row, it compares the 4 columns in the INDEX against the 4 columns in the new row.

  • Show input after selecting date in datepicker

    Hi
    I'm using apex 4.1.1
    And i want to use a Date Picker item on my page. This works, but.. When a user selects a date you can see the date highlighted. But in the "textarea"corresponding tot the datepicker is not showing the date. This shows the date after clicking the close button.
    I would like to show the date directly after selecting a new date. Does anyone know how?

    I am having the same issue - and wondering if this is a bug, or the functionality that we expect is not possible?
    It seems that when using a date picker field (in our case, for a field that requires a timestamp), when you click on a day in the calendar, the chosen date is not reflected in the field until the user clicks the 'close' button.
    I would expect this to be how it SHOULD work - the user chooses a date and time from the picker popup, and it is instantly reflected in the value displayed in the field. Then the user can click 'close'.
    Alternatively, if this is expected behaviour, then maybe the button should be renamed to something like 'select' which would be more appropriate and infer that the date will now be updated in the field.

  • I am trying to update a chart in Pages that I created in Numbers, but the refresh button does not show up after I save the Numbers file. Thoughts?

    I am trying to update a chart in Pages that I created in Numbers, but the refresh button does not show up after I save the Numbers file. Thoughts?

    It is hard to exactly understand what you have  done or not by you one sentence description. My thought is have you read in the Pages User Guide? Here is what it says about updating a chart in Pages:
    Updating a Chart Copied from a Numbers Document
    If you’ve created a chart in Numbers, you can copy it and paste it into your Pages document. After it’s been pasted into Pages, the chart remains linked to the data tables it references in Numbers. To change the chart data, open the original Numbers document and edit the data there, save the Numbers document, and then refresh the chart data in Pages.To update a chart after you’ve updated its linked Numbers table:
       Select the chart on the page and click the Refresh button that appears.
    Note: You must save the Numbers document before copying and pasting your chart into your Pages document and after editing the Numbers data tables that the chart references.
    I hope it has helped you.

  • I was erase all contect and data after it it showing only apple  logo from last 2 hour i need help

    i was erase all contect and data after it it showing only apple  logo from last 2 hour i need help

    You should reset your iPhone,
    Reset your iPhone by pressing the 'Sleep' and 'Home' button at the same time for about 15 seconds or so. Your iPhone will then go through a reset / reboot procedure and will be ready for use within about a minute.
    Don't worry about doing this as you will not lose data or settings.
    Good luck and do report back.

  • Just noticed that when I close my mail app by double clicking the home button and swiping up it dies something weird. After doing this when I open my mail, instead of showing all my mailboxes it automatically opens one of them instead. Anyone know why?

    Just noticed that when I close my mail app by double clicking the home button and swiping up it dies something weird. After doing this when I open my mail, instead of showing all my mailboxes it automatically opens one of them instead. Anyone know why?

    Just to recap, this is a collection of ports I have collected over time for people who needed this information when setting up the HP ePrint app so that they could view their email from within the app.  I am certain other applications also need this information.  Although lengthy, I could not find a more comprehensive place to retrieve this information.  Feel free to post additional information, faulty information, or other related topics below as this is simply a collection of data and it would be practically impossible to test all of them. Thank you!
    Don't forgot to say thanks by giving "Kudos" if I helped solve your problem.
    When a solution is found please mark the post that solves your issue.
    Every problem has a solution!

  • PLD Report does not show data from Query

    Hello,
    SAP b1 9.0 PL08 on MSSQL 2008 and I get data on the query, but when the PLD prints, it shows nothing. Is there a way to filter the data that the PLD shows? Does PLD have its own SQL script it uses b/c its not showing data from the query.
    Thanks,
    Nick

    Hi Nicholas,
    Please check below links.
    query based print layout design
    Print Layout Designer \Custom Reports
    How to Make a Print Layout (PLD) Report from a SBO Query | SBOnotes.com
    http://www.tegrous.com/wp-content/uploads/2011/07/HowTo_QPrintLs_88.pdf
    Hope this help
    Regards::::
    Atul Chakraborty

  • CFGRID does not show data (CF9.0)

    Under development server, CFGRID show data , all is fine , correct. (CF9.0  version dev)
    Under production server , CFGRID does not show data, only a grey line (like a HR).
    How to debug this ?
    Thanks,

    Kindly check below to troubleshoot this issue:-
    Is there any difference between your CF production & developement server setting summary?
    Is there any browser script level difference between your both CF server?
    Are you getting any relevant logging error in your CF server application.log & exception.log?
    Run a very simple cfgrid running app to check, either getting issue with that too or not.

  • After doing a Google search, I click on a link and go to the searched web page.  When I go back to the Google page using the back button the links I originally clicked on no longer show as "greyed out".  Any idea what is going on with the browser?

    After doing a Google search, I click on a link and go to the searched web page.  When I go back to the Google page using the back button the links I originally clicked on no longer show as "greyed out".  Any idea what is going on with the browser?

    Type '''about:config''' in the Location (address) bar and press the "Enter" key. When you see a warning, click '''I'll be careful, I promise!''' button.
    * Preferences that have been modified are shown as '''bold (user set)'''.
    * Preferences can be '''Reset to the default''' or changed via the right-click context menu.
    -> In the '''Filter bar''', type '''browser.sessionhistory.max_entries'''
    * Right click the preference '''browser.sessionhistory.max_entries''' and click '''Modify'''
    * Change value from 0 to whatever you want over 0 (Default value is 50)
    * click OK
    -> Close the '''about:config''' tab and then Restart Firefox.
    See this post:
    * https://support.mozilla.com/en-US/questions/860894#answer-229574
    Check and tell if its working.

Maybe you are looking for

  • Can't download file

    I can upload files in my custom table, but after delete file from default table (i don't why it's flows_020100.WWV_FLOW_FILES) i have "page not found error". Can you help me, and width downloading too.

  • 2LIS_02_SCL loaded to DSO

    Hi, I have just started up a purchasing project. According to SAP standard solution 2LIS_02_SCL is loaded into DSO's with a key containing: Document, Item, Schedule line. However, as far as I can see, a lot of info is lost in that concept. Ex. for th

  • Posting a "goods issue" msg NR751

    Hi All, posting a goods issue, sap gives me the message NR751... But the number range has been created ... I can't post the goods issue Could anyone help me? thanks Gandalf

  • I have 2PCs with T/B can I get emails sent to one on the other temp measure.

    I have two computers using thunderbird for emails, as I intend updating the one of them that I get my main emails sent to I was wondering if when I have it offline would it be possible to get my emails using the other computer ( it is a Ubuntu comput

  • How to update mac os x 10.4.11.. please help i dont have the funds to buy a new mac

    how can i update my mac to a newer version Hardware Overview:   Model Name:          MacBook   Model Identifier:          MacBook2,1   Processor Name:          Intel Core 2 Duo   Processor Speed:          1.83 GHz   Number Of Processors:          1