The matrix - unescaped data report

Following my recent question on the matrix report proposed by fac586

I was wondering how you could modify the XML not escape content coming from 'nominative' (query below)

for example: I added an html tag similar to the empno field, to contrive to script at the client level.

When analyzed by magical xmltransform etc.

with thedata as (
  select
      deptno, job
     ,htf.bold('deptno:')||deptno||';'||count(empno) over (partition by deptno order by null) empno
  from scott.emp o
)
,order_pivot as (
    select
        deptno
      , job_xml
    from  thedata
    pivot xml
        (max(empno) n_orders for job in (select distinct job from thedata)))
select
    deptno
  , xmlserialize(
      content
      xmltransform(
          job_xml
        , xmltype(q'{
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  
              <xsl:output method="html" />
                <xsl:template match="/PivotSet">
                  <xsl:for-each select="item">
                    <td>
                      <xsl:attribute name="headers">
                        <xsl:value-of select="column[@name='JOB']" />
                      </xsl:attribute>
                      <xsl:value-of select="column[@name='N_ORDERS']" />
                    </td>
                  </xsl:for-each>
                </xsl:template>
            </xsl:stylesheet>}'))) matrix
from     order_pivot
order by deptno;


the data is escaped.

<td headers="ANALYST"></td><td headers="CLERK">&#60;B&gt;deptno:&#60;/B&gt;10;3</td><td headers="MANAGER">&#60;B&gt;deptno:&#60;/B&gt;10;3</td><td headers="PRESIDENT">&#60;B&gt;deptno:&#60;/B&gt;10;3</td><td headers="SALESMAN"></td>



I want to keep the markup for use in the final report, that is to say:

<td headers="ANALYST"></td><td headers="CLERK"><b>deptno:</b>10;3</td>


I would also like to know if there is a better way to do this kind of pivot, re: MAX (expr)

See you soon

Scott

Scott.Wesley wrote:

Following my recent question on the matrix report proposed by fac586

I was wondering how you could modify the XML not escape content coming from 'nominative' (query below)

for example: I added an html tag similar to the empno field, to contrive to script at the client level.

When analyzed by magical xmltransform etc.

  1. with the nominative as)
  2. Select
  3. DEPTNO, job
  4. htf.bold('deptno:') | DEPTNO | « ; » || Count (empno) on empno (partition sort null deptno)
  5. from scott.emp o
  6. )
  7. order_pivot as)
  8. Select
  9. DEPTNO
  10. job_xml
  11. of the crossroads
  12. Pivot xml
  13. (max (empno) n_orders for employment (select distinct nominative use)))
  14. Select
  15. DEPTNO
  16. xmlserialize)
  17. content
  18. xmlTransform)
  19. job_xml
  20. , xmltype (q' {})
  21. http://www.w3.org/1999/XSL/transform">
  22. (((}'))) matrix
  23. of order_pivot
  24. order by deptno;

the data is escaped.

  1. <><><>

I want to keep the markup for use in the final report, that is to say:

  1. DEPTNO:10; 3

Apply the utl_i18n.unescape_reference method on the xmlserialized output:

with thedata as (
  select
      deptno, job
    ,htf.bold('deptno:')||deptno||';'||count(empno) over (partition by deptno order by null) empno
  from scott.emp o
)
,order_pivot as (
    select
        deptno
      , job_xml
    from  thedata
    pivot xml
        (max(empno) n_orders for job in (select distinct job from thedata)))
select
    deptno
  , utl_i18n.unescape_reference(
        xmlserialize(
          content
          xmltransform(
              job_xml
            , xmltype(q'{
                
                  
                    
                      
                        
                          
                            
                          
                          
                        
                      
                    
                }')))) matrix
from    order_pivot
order by deptno;

Tags: Database

Similar Questions

  • HELP required on forming the matrix of data using PL/SQL

    Hi all

    I'm new on this thread and need your help in this regard.

    I have a requirement for the construction of a matrix of 5000 X 5000 using PL/SQL. My original data tables have 5000 lines each and I need to make a correlation analysis using these data and need to store in a physical table, and not in memory. This feat feasible the simple use of PL/SQL? I understand that Oracle DB has a limit of 1000 columns (but not sure) and so I would like to know if there is a workaround for this kind of scenario. If not, what are the other alternative methods to achieve this feat? Do I need to use any 3rd party tools to do this? A quick response from experts is highly appreciated.

    Thanking you in advance all the gurus.

    Rgds

    SAI

    1006089 wrote:

    I have a requirement for the construction of a matrix of 5000 X 5000 using PL/SQL.

    Possible. But this will require a large part of the memory. As PL/SQL is a language server side, this means the server's memory. That means server potential resource problems.

    And that the server environment is a multiprocessu multi-user environment, it also means potentially several copies of this code of matrix running multiple processes, each putting a request very heavy on the resources of the server. Is no longer a matter of potential server resources, but a guarantee... (exactly the same problem if you use app server architecture and Java or .net)

    You have to ask what is the cracking of data, server-side language? The answer is SQL. No PL/SQL. SQL runs rings around PL/SQL, Java, C/C++ and other languages when it comes to complex, fast and scalable, processing of large volumes of data.

    So you ask yourself why use PL/SQL? With his expensive server memory footprint? SQL and not SQL tables that are designed to deal with massive data effectively and efficiently?

  • EMERGENCY required on forming the matrix of data using PL/SQL

    Hi all

    I'm new to this thread and need your emergency assistance in this regard.

    I have a requirement for the construction of a matrix of 5000 X 5000 using PL/SQL. My original data tables have 5000 lines each and I need to make a correlation analysis using these data and need to store in a physical table, and not in memory. This feat feasible the simple use of PL/SQL? I understand that Oracle DB has a limit of 1000 columns (but not sure) and so I would like to know if there is a workaround for this kind of scenario. If not, what are the other alternative methods to achieve this feat? Do I need to use any 3rd party tools to do this? A quick response from experts is highly appreciated.

    Thanking you in advance all the gurus.

    Rgds

    SAI

    DOUBLE WIRE!

    Now that you have published in your question in the forum SQL and PL/SQL please mark this thread ANSWERED.

  • How to set the time of data collection for information Publisher report

    Hello everyone,

    So, I'm trying to set up a report, which contains some information of tablespace. The report must be sent to my e-mail account around 07:00 every day, so I have an overview if we run into a few problems with some full tablespaces. the report and mail notification works well but my only problem is, the data are not updated. There is a comment under each data table in my report which said that the data had been updated on 8 to 13 hours ago according to the target database. is there a way I can trigger the update of data report on a specific time? So I can update the data before you run the report job every morning around 07:00? I'm totally noob, so I hope someone can help me, I tried to google it but I couldn't find anything useful.

    Unfortunately, there is really no good way to 'schedule' collection for this because it is perceived with a dozen of other data points and likely to cause problems.   What you could do, is create a metric custom extension with query data file you need (simple Dungeon it do not go beyond what you really need to prevent performance problems), deploy the metric on all target databases, then disable collection of gui (metrics and collection parameters) and cron the collection to run at a period determined using emctl control agent runCollection : .   You can then create a report about the data collected in mgmt$ metric_current.

  • Print data LabVIEW using the MATRIX printer?

    How to program in LabVIEW such as some data may be printed matrix printer?

    p/s: the matrix printer (EPSON TM - U220) is connected to the computer via a serial port.

    I thank very you much for the replies...

    =)

    I found the solution.

    the pre-selection of the printer matrix printer dafault and use an icon in LabVIEW called - will report in simple text format.

    =) Thank you very much for your answer!

  • The matrix in the Apex report

    The matrix in the Apex report

    I met a delicate situation and would need the support of members of the community of Apex here.

    I would need to build a matrix report in Apex over a table containing about 500 rows and 2 columns.

    The report of the matrix must be format (col X lines) 20 X 25 to display all the data in the table.

    Please consider the following data containing 15 rows and 2 columns

    Table A

    Col_data Col_status

    ABC to the top

    BCD upward

    CDE upward

    def upward

    EFG down

    FGH upward

    IGS upward

    hij upward

    JKL upward

    KLM upward

    LMN upward

    MNO upward

    NOP upward

    Professions down

    PQR upward

    Now these data in the table should be displayed as a 3 X 5 matrix report.

    The idea here is to display only the col_data to end users.

    Col_data text would be colored in red or green according to the col_status than upwards or downwards, respectively.

    Formatting conditional html should be applied in this case.

    The problem here is that we report of matrix in Apex. This must be done in the sql query.

    While generating a matrix report using the sql query, we can select only a single column, and the status column is missed.

    This is why the data required for the conditional formatting (color) are not yet selected if generate us a matrix report using the sql query.

    Any help or alternative approach here would be greatly appreciated.

    ascheffer wrote:

    It is not all "tricky", or I miss the point?

    1. SELECT max (case when mod (rn, 3) = 1 then col_data end) col1
    2. , max (case when mod (rn, 3) = 2 col_data then end) col2
    3. , max (case when mod (rn, 3) = 0 then col_data end) col3
    4. , max (case when mod (rn, 3) = 1 then col_status end) col1_stat
    5. , max (case when mod (rn, 3) = 2 then col_status end) col2_stat
    6. , max (case when mod (rn, 3) = 0 then col_status end) col3_stat
    7. , ceil ((rn) / 3)
    8. (select col_data, col_status, row_number() on rn (order by null) from tablea)
    9. Group by ceil ((rn) / 3)

    It is perhaps not in SQL, but is not the only consideration... terms

  • Firefox Version 27 Action Menu error in Reporting Services. An error has occurred with the extraction of data.

    Hello, since I've updated for Firefox 27.0.1 on Windows 7, I have a problem with Reporting Services on a Sharepoint site. It is a site of Sharepoint 2010 with SQL Server Reporting Services 2012 Sharepoint integrated mode. I was already on Firefox version 26 and didn't meet with this problem.

    When a report is opened and you use the Actions link on the Reporting Services toolbar, I get the following error messages.

    An error has occurred with the extraction of data. Please, refresh the page and try again.

    I tried updating to the beta version of Firefox 28 but the same error occurs. I see that someone else is having the same problem here. http://SharePoint-community.NET/forum/topics/reporting-service-and-Firefox-27

    Any help would be appreciated. Thank you!

    Ryan

    Firefox version 28.0 has corrected this problem. Thank you!

  • Error code: 0xC004E002, the software licensing service reported that the license store contains data of the unstable after installing Windows updates.

    Original title: I installed a windows update and all of a sudden I can't connect to my computer using my password it says error data is unstable with microsoft

    It says the software licensing service reported that the license store contains inconsistent data.      I have a windows vista hp pavillian

    Code 0xC004E002

    Hi JillCollas,

    When you are in the display of error message you will get a support contact option once you click on it, it should open up Internet explorer. If you are able to open IE page, then follow the steps and see if it helps.

    a. Click Start and type cmd in the search box.

    b. right click on cmd and then click Run as administrator.

    c. at the command prompt, type the following commands and press ENTER:

    Type: net stop slsvc (it may ask you if you're sure, select Yes)

    Type: cd %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareLicensing

    Type: Rename tokens.bar tokens.dat

    Type: cd %windir%\system32

    Type: net start slsvc

    Type: cscript slmgr.vbs - FLIR (it may take time for this will be complete, please be patient)

    Reboot twice

    You may enter the product again key, and then activate.

    For more information, you can consult the following articles:

    Error 0xC004E002 during activation of Windows Vista and Windows Server 2008

    Activating Windows: Frequently asked questions

    Hope this information is useful.

  • How to associate cluster esx with the data report store

    Hi all

    I'm running a repore that displays data stores less than 50 free concerts. The storage team would like a coloum for esx clusters associated with the LUN. I can't see to find it and what is possible.

    Thanks in advance,

    Scott.

    I would create a WCF function, script type, with a timeRange parameter and a new data store VMWDatastore context parameter, required, not a list.  Set the output in common: string.

    Add the following script:

    QS = server. QueryService

    Query = "!" "VMWCluster where esxServers.datastores.uniqueId = ' ${datastore.uniqueId}"

    cluster = server. QueryService.queryTopologyObjects (query)

    clusterNames = clusters? collect {cluster-> cluster?. name}?. Join(', ')

    return clusterNames

    You can then use this in your report, feeding the entrance of context for the current row data store.

  • VMware Capacity Planner data report - shows don't not all systems in the dashboard Version 2.7

    I worked on an evaluation with over 1300 machines for a few weeks now. I just ran a VMware capacity Planner data report today and it shows that 37 systems. Anyone else having this problem? I started a Monday SR something else and still have no answer, so I thought I would try the forum first this time.

    Dave Convery

    VMware vExpert 2009

    http://www.dailyhypervisor.com

    http://communities.vmware.com/servlet/JiveServlet/download/38-20623/vExpert_logo_100x57.jpg

    Prudent. We do not want to make of this.

    Bill Watterson, "Calvin and Hobbes".

    Try to create a group of man LAN and add the systems and re - run the report.

    Which fixed the problem with a report, I ran...

  • How to maintain the consistency of data of continuous report during data loads?

    Hi all

    I have a few reports that draw data from data on sales, and this mini mart - data warehouse is responsible for hourly and my report has to show data updates... it that changes necessary config that I have to do in the RPD to make reports to obtain the most recent data?

    Thank you
    DK

    DK... The imp thing, you need to take care is to disable the cache, or purge the memory cache after each load by using the method of pooling of events. This will ensure that you see the most recent data and data not expired.

    Hope this helps

  • The most recent date in the report filter.

    Hello

    I have a report with a date column. I would like to run the report for the most recent date. I want to add a filter to the report that retrieves data for the latest in date. What would be the best method to use in the filter. Please notify. Thank you.

    You must first determine what the column that contains the dates on which you want to filter. Say so you have a Date of treatment column containing dates transactions are processed.

    (1) add this column in your workspace.

    2) click this column filter button, and then click Advanced Options > convert this filter in SQL.

    (3) after the name of the column, enter MAX (date_column). So you will have:

    "Table name". " "Date column ' = MAX ("Table name". ("' Date column")

    Now the chances are that you will have a lot of reports who need the "latest date" filter. Therefore, you should really do is built that filter in the repository and expose it as a filter registered for all to use.

  • When the research report I get the message "no data found".

    When I run a search on one of the fields of research, I get the message "no data found". Anyone can help me to understand what it is that I don't hurt or not done? Thank you

    Deanna

    http://Apex.Oracle.com/pls/OTN/f?p=4550:1:4031563210204584

    Workspace: DEANNA2
    Username: DDOVE@KHP. KS.GOV
    Password: Dclipse03

    Page 21

    No, I added a calculation to the page to see what is the sql code that is returned by the function... Now, I could add in another column and see what happens...

    That's why I suggested moving it to a function outside the page... You can test this in the sql command window and the prefect what you are after... Have done reports a little like this... Or even more fun, with a function in the pipeline...

    Thank you

    Tony Miller
    Webster, TX

  • Filling of the matrix statistical report

    Hello


    I have a table of interim report matrix (matrix) for the generation of statistical reports.

    The table must be completed at the request on the need of the user. I think fill a parameter field and a button on the page with the label [complete]
    [] where the parameter must be entered to satisfy the condition. If the button is pressed it call/run a sql batch programs that will update
    each row/column of the matrix table.

    How do a button that calls one batch program? And given that the batch program can take a while at the end there should be something mobile
    the user can see... to demonstrate that the program is still ongoing and the hanging... something like a gauge or hourglass the wll say completion % or
    something like the output of the program >... 6 rows processed...

    Thank you very much

    Hello

    Take a look at: Please wait... message - this is also based on the example of Carl

    Andy

  • Completely disable the presentation of data

    Hello

    I set the following preferences:

    user_pref ("datareporting.healthreport.service.enabled", false);
    user_pref ("datareporting.healthreport.uploadEnabled", false);
    user_pref ("datareporting.policy.dataSubmissionEnabled", false);
    user_pref ("toolkit.telemetry.unified", false);

    Yet, Firefox 40.0.2 has created a new folder "datareporting" in my profile folder and continues to add new elements to it.
    How can I completely disable Data Reporting?

    Thank you.

    https://Bugzilla.Mozilla.org/show_bug.cgi?id=1195552#C4

Maybe you are looking for