control by using the xmlconcat break

Hello

In the discussions archived at https://community.oracle.com/thread/2524876?tstart=0

Someone posted the following code.  It served as a good example for something I've implemented with utl_smpt.  However, now I need add a control break.  Let's say I select all application_id rather restrict to "p_app_id".  I would like to break the application_id change by inserting a cr / lf between lines of data.  Eventually, I would like to show application_id on rows of data for each cluster so that I wouldn't have to repeat the application_id field all ranks.  I don't know how to do that can provide you with assistance.

Thanks a lot for watching this.

select
    xmlserialize(
        content
        xmlelement(
            "table"
          , xmlconcat(
                xmlelement(
                    "tr"
                  , xmlconcat(
                        xmlelement("th", 'Application No')
                      , xmlelement("th", 'Application')
                      , xmlelement("th", 'Page ID')
                      , xmlelement("th", 'Elapsed Time')))
              , xmlagg(
                    xmlelement(
                        "tr"
                      , xmlconcat(
                            xmlelement("td", application_id)
                          , xmlelement("td", application_name)
                          , xmlelement("td", page_id)
                          , xmlelement("td", elapsed_time)))
                    order by elapsed_time desc)))
        indent size=2) html_table
from
    apex_workspace_activity_log
where
    application_id = :p_app_id
and elapsed_time > :p_elapsed
and trunc(view_date) > trunc(sysdate-1)

Post edited by: PhilMan2

Example usage of schema SCOTT:

SQL > select d.deptno, d.dname, e.empno, e.ename

e scott.emp 2

3. join scott.dept d = e.deptno d.deptno

4;

DEPTNO DNAME EMPNO, ENAME

------ -------------- ----- ----------

20 7369 SMITH RESEARCH

30 SALE 7499 ALLEN

30 SALES 7521 WARD

20 7566 JONES RESEARCH

30 SALES 7654 MARTIN

30 SALES 7698 BLAKE

10 ACCOUNTING CLARK 7782

10 ACCOUNTING KING 7839

30 SALES 7844 TURNER

30 SALES 7900 JAMES

20 RESEARCH FORD 7902

10 ACCOUNTING 7934 MILLER

with sample_data as)

Select d.deptno, d.dname, e.empno, e.ename

from scott.emp e

Join scott.dept d = e.deptno d.deptno

)

Select xmlserialize (content

XMLAGG)

XmlElement ("div"

, xmlelement ("caption", t.deptno |) ' - ' || t.DNAME)

xmlelement ("table",

xmlelement ("tr"

, xmlelement ("th", "Employee Id")

, xmlelement ("th", "Employee name")

)

xmlagg)

XmlElement ("tr"

xmlelement ("td", t.empno)

xmlelement ("td", t.ename)

)

)

)

)

)

as clob

dash

)

of sample_data t

T.deptno group, t.dname

;

that makes something like this:

10 ACCOUNTING
Employee ID Name of the employee
7782 CLARK
7934 MILLER
7839 KING
20 RESEARCH
Employee ID Name of the employee
7369 SMITH
7902 FORD
7566 JONES
30 SALES
Employee ID Name of the employee
7499 ALLEN
7900 JAMES
7844 TURNER
7698 BLAKE
7654 MARTIN
7521 WARD

(Sorry for the formatting of the Publisher scrapped it after submitting the post)

Tags: Oracle Development

Similar Questions

  • VISA: (Hex 0xBFFF001) timeout expired before the operation is complete. I get this error when you run a VI (instrument is set up to be controlled remotely using the TCP/IP Protocol)

    VISA: (Hex 0xBFFF001) timeout expired before the operation is complete. I get this error when you run a VI (instrument is set up to be controlled remotely using the TCP/IP Protocol)

    Please suggest a solution.

    Thank you very much, it worked!

  • Control mouse using the voice command

    Hey...

    I'm doing project control of mouse by simple voice command and also the click of mouse using the voice command action...

    I have problem to compare my order with the standard command...

    Please help how I can make this comparison and produce output...

    Ginelle

    I would like to start by this library. I found this a long time ago, but it would allow you to build what you need

  • Not able to scan from the printer to my computer control panel using the HP Photosmart 5510

    Hello

    I recently bought the new HP Photosmart 5510 all in one - and I am not able to scan from my printer to my computer.

    I am however able to scan by launching the scan of the computer. I talked to HP customer earlier this evening and we ran printing + scan doctor and can't find any problems.

    I am running Windows 7-64 bit and that you have installed my wireless printer using the Installation CD supplied with the printer today.

    I could not finish troubleshooting with the technician that I talked to because I had to go to work. The person that I spoke with proposed possibly the full functionality of software downloaded from the hp.com site, which I'm happy to do, but I think that it is useless, because I have the CD of installation here. (The rep that I talked to was very nice, but I prefer not to have to uninstall and reinstall if it is not necessary)

    Because as I mentioned above, everything works perfectly and I am able to scan - but not directly from the printer itself.

    When I try to scan from my printer to my computer an error message appears on the control panel of the printer indicating that: there is no scan destination options of analysis chosen / no..

    However, I can't find anywhere with my HP software where I could add / make sure that the destinations were there. (As I could on my other printers. (IE. By the solution Center)

    This printer does not appear to be a solution center that I could find and the scanner installed with the CD icon doesn't give me any options regarding changing the settings of the parser

    I wonder:

    1. the Hp Photosmart 5510 does not have the capacity to scan from the printer control panel?

    2 OR the CD installation provided with my printer only has the base drivers as the agent of tech support suggested? Which means to scan from my printer I need to download drivers for your hp Web site?

    3. or is the problem because of something else entirely?

    Thanks for your help!

    HI Dublin,

    Follow the steps below to uninstall and reinstall the printer.

    1. open Control Panel

    2. click on uninstall a program

    3 uninstall the Photosmart 6510 in the list

    4 restart your computer

    5. download and install the latest version of Adobe flash player

    http://www.Adobe.com/support/flashplayer/downloads.html

    6 download the drivers and full software functionality, and then reinstall the printer.

    Version 28.8

  • External control by using the Matrox Mini with PP5.5, where is the settings?

    I downloaded a version track Adobe Production Premium (Mac version) today. I had external monitoring (video & audio) using the Matrox to work in After Effects. But in Premiere Pro, I can put the Audio through my Sony HDTV via Matrox Mini, but not the video. I can't find a preference to set the video preview as there is in After Effects. Any ideas?

    Mac Pro, ATI 5770, 16 GB Ram, CalDigit VR Mini Matrox.

    Hello

    Did you use the Matrox presets when you started a new project or the sequence?

    No have you defined the Matrox player as the default is Adobe?

    Darren

  • Use the tag break html or CSS?

    I have a page on my site where the last two floating images caused problems. Because the text next to each other was not very long, the images got too close and broke the page layout. I did a miracle by inserting some HTML break tags, but I wonder if a more professional practice to created an ID or a CLASS by adding the bottom margin more paragraphs next to the photos?

    http://www.keithpurtell.com/kthings/Jack-Vance.htm

    Use HTML to structure your page titles, paragraphs, lists etc. It provides connections for CSS do its job.

    Use CSS for all Visual presentation such as the layout, margins, whitespace etc.

    There is very little reason to use
    Tags on CSS.

  • tab control by using the keyboard functions

    Hello

    Thank you very much for helping with my questions.

    I want to know how to open different tabs in my application using keyboard keys (access key).

    Once the tab is key-focus (tab for it) or set key-focus the left and right arrows will select different tabs.

    Ben

  • the value 600 d/T3i for firing the shot with a wireless remote control without using the timer involved?

    A 600 d/T3i is adjustable to shoot with a remote wireless without the timer is involved? I was not able to find a way yet.

    Yes. Your remote control has a switch on the bottom it is shoot immediately, or with a 2 second delay sets. I guess that yours will be set to position 2. It must be set to 0. Problem solved. Best regards, col.

  • Remove large box of AOE III using the "pause/break".

    It started on Vista, when I added Internet high speed. It seems that some changes have been made to my original game #1 disk that I didn't NOT ASK or APPROVE. I am disabled and can no longer play the game (I've had it for 3 years and now feel cheated by this scam) also, the other settings have changed - maps, scenarios of implementation, etc.. I need to know how to restore my INITIAL PROGRAM. The news is absolutely unusable.

    Hello
     
    1. what exactly happens when you try to play the game of AOE (Age of Empires)?
    2. what program you want to restore?
    3. What does the dialog box refers to?
     
    We recommend to uninstall the existing set, then restart the computer. Reinstall the game once more and then check its features.
    Check out this article, hopefully it will help: http://support.microsoft.com/kb/910814
     
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.
  • Control using the arrow keys

    I hope someone can help. I am new to Flash CS4 - yet to learn - and that must have left me speechless for days! Deadline is always the same...

    I'm redrawing a powerpoint presentation that contains a lot of graphics etc (total 29 slides) and I want to animate it in Flash. I developed everything in Illustrator and I am now at the stage of do this everywhere Flash.

    Once I have everything Flash and animation, what I want to do is let the presenter (my client) to control playback using the arrow keys (aka powerpoint). My intention is to have labels for the various steps in the graph where the animation stops (using stop();) and then when the presenter press the right arrow key presentation will continue to play. I also need the left arrow key to return to the previous where label they advance too far or they must go back to look at something.

    Also, I was wondering what best practice would be creating something like this. Should I create separate Flash files for each 'slide' and load (really do not know how to do this) or use separate video clips for each slide in a single Flash file? My lack of knowledge leaves me wanting to build along the timeline of a, but I guess it would get too complicated...

    My apologies if this has been answered elsewhere, but after a search both the Adobe and the web site, I can't find an appropriate solution.

    Thanks in advance.

    The code probably told "stop (...)". "You can change that to gotoAndPlay (..." and then add stop(); instead in the timeline. ")

  • Ask about the Pause/break key on the keyboard

    As Saroseus,

    I have a program that uses the Pause/break to continue to operate and without it I can not continue to use it for work. The work of the society for us gave keyboards with the Pause/break key, but it is not ergonomic and it's hurting my wrist to use. That is why I bought this keyboard. This is a great keyboard and it works well, but I need this button "Pause". While Microsoft can do you something about it.

    Hello

    Let me ask you;

    • What exactly you're talking about when you say, ' I need this button "Pause"?
    • Is not the Pause/break key in the keyboard you purchased, working?
    • This keyboard does not have a Pause/break key?
    • Do you mean you bought now ergonomic keyboard?
    • The keyboard has Pause and break keys separately?

    It might be possible that some newer keyboards may have separate keys for the pause feature and the pause feature. Instead of these two functions are on the same key, the keyboard has a separate PAUSE button of the PAUSE button.

    On many keyboards, the key that controls the functions pause and break is usually labeled as the PAUSE button. As a result, many keyboard shortcuts show you "Press a PAUSE button." However, when you only press the BREAK key, the default behavior is to take a break.

    This behavior that many people know can cause some confusion on newer keyboards that have separate PAUSE and BREAK keys. For example, the newer laptops may have separate PAUSE and BREAK keys.

    Steps to reproduce the behavior

    Follow these steps on a keyboard that has one button PAUSE/ATTN:

    1. Open a command prompt window. To do this, click Start, click run, type cmd.exe, and then click OK.
    2. At the command prompt, type dir, press the ENTER key and immediately press the PAUSE/BREAK key.

      Note that the list of files in the directory stops. This behavior indicates that the default behavior of the key is to pause. To see this behavior for a directory that has a short list of files, you must press the PAUSE/BREAK key very quickly after you press the ENTER key.

    3. Press CTRL + PAUSE/BREAK.

      Note that the list of files in the directory stops and returns you to the command prompt. This shows that the secondary behavior of the key is to break.

    In addition, if you follow these same steps, and if you press the CTRL + Windows Logo + PAUSE/BREAK Keyboard shortcut to open the System Properties dialog box, the dialog box does not appear. This behavior is further proof that the default behavior of the PAUSE/BREAK key is to pause.

    If the keyboard does not pause button, you can use the screen keyboard and check.

    Open the on-screen keyboard by clicking the Start button , clicking all programs, Accessories, ease of access, and then click on-screen keyboard.

    You can see: using the keyboard (OSK) typing on-screen

    Hope this information is useful. Please feel free to answer in the case where you are facing in the future other problems with Windows.

  • Design of menus using the Manager of events and containers

    I will review my menu interface using a Labview event Structure that has a lot of control on the tab pages.  I want to start making the correct design here approach.  By registering to the façade of the controls [] property as an event, I can write cases of the event for each of the controls on the front panel.  However, I have run into trouble when I have controls on the tab pages.  I have attached a VI that shows how I want to set up.  The event hanlder fires when I change page in the tab control.

    What is a good way to be able to decipher individual controls in the tab control and

    What is the feature (label, Ref number, etc.) that I should write the case of event on for the maintenance of good code?

    Looking at your code, you registered for the events of changing value for controls on the front panel, not in the tab control. Use the node property for the control to the tab to get references to the pages and each page get the references to the controls on this page. Build an array of all the controls on all pages (or you can separate registration for each page to make your life easier potentially) and register these controls for the value change events. See below...

  • Publish a queue using the shared variable

    I have a 2D table queue and I would like to publish (the reference) in a shared variable, so that I can pay the items in the queue in an another vi. I tried to create a queue control and used the custom of the shared variable control option, but it gives me an error "invalid data type.

    You try to read from the queue to another computer? Passing the reference to the queue on the network to a another computer will not allow the application to read data from the queue. The queue data is stored only locally.

    I honestly don't know why you get an error trying, however. Other options to access a queue in the world on the same machine are to use a Global Variable, rather than a shared Variable, or to get your reference queue by using a well-known name who know the other parties of the request.

  • User account control appears when the is not necessary.

    The user account control appears everytime I open Windows Live Mail. How can I stop this, but retain control of active user account when needed on the other actions of the computer?   Thank you

    Hi JosephDoherty,

    UAC (User Account Control) notifies you when changes will be made to your computer that require administrator-level permissions.

    You can try to change UAC settings and see if it helps.

    Note: You must restart your computer when you enable or disable UAC. Change levels of notification does not require that you restart your computer.

    Important: Turn on UAC after you complete the steps.

    For more information, you can consult the following articles:

    How can I change the behavior of user account control by using the slider?

    What is user account control?

    Enable or disable the User Account Control

    Hope this information is useful.

  • I want that my users who log on to the virtual remote desktop to use the one I put in this image and not their local keyboard

    Original title: the remote keyboard language

    Hello

    I connect to a remote virtual desktop. My local computer uses a different keyboard language than the remote.

    I want that my users who connect to the virtual remote control to use the one I have set myself in this picture and not their local since keyboard only supports us that we provide in the virtual, not on their local machine.

    I've tried the "Reg" IgnoreRemoteKeyboardLayout key, but I've been the opposite. Who closes?

    Is their a way to force the RDP to use the remote keyboard and not local?

    Thank you

    Hello

    Thanks for posting your query in Microsoft Community.

    I understand you have questions using the remote keyboard on the Windows computer. So, please follow the link below to post your query in the Technet forums, because they have more expertise on this issue.

    TechNet forums

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?Forum=w7itpronetworking

    I hope this helps.

    Thank you

Maybe you are looking for

  • empty the trash on the dock

    A small window opens saying trash does not empty because a certain file still works

  • Wireless laptop drive HARD Toshiba 1 TB Canvio Aero Cast - warranty issue

    Hello I brought toshiba portable hard drive 1 TB canvio aero typecast sharaf DG store in Dubai 22 wireless, February 2015 and the India m. I asked the saleswoman who will get warranty on the product in India and they said yesso I brought the canvio b

  • Pesistent Subvi

    I want to make my own sub - vi that has the persistent properties of vi 'Elapsed Time' which is in the functions => programming-online pallet of timekeeping.  The subvi has an infinite loop, so the expected behavior is that as soon as you call the vi

  • you need to take sd card and out before the iconia 810 a1 recognizes the card

    I have a problem with my verbatim microsd 32 GB class10. After that I turned the Tablet the sd card is not recognized. I need to go out and establish new, and then the Tablet recognizes the card sc. It is in the fat32 format. I tested with a 16g (don

  • Storm affected my computer - I am now unable to open all Control Panel items

    A month or there we had a big storm in our area that has lightning.  My computer is plugged into a power strip surge.  After the storm, I was unable to open everything in the control panel.  This includes sound, displaying the desktop, add/remove pro