XMLForest and Alias

Hi
I'm trying to build a piece of xml which is made up of data from two separate tables. It needs to get the one tenant from table TENANT and any additional tenants from the table ADDITIONAL_TENANTS.
The problem I have is that the last element of first xmlforest must have an alias (I've named it wrong), but by giving it an alias it is nested in the element I want it to be in.
Here's my code.
SELECT XMLElement("TenantName", XMLForest(a.CODED_TITLE_VALUE AS "Title",
                                                       a.FIRST_NAMES AS "Forename",
                                                       a.LAST_NAME AS "Surname",
                                                  (SELECT XMLAGG(XMLForest(ad.CODED_TITLE_VALUE AS "Title",
                                                                                          ad.FIRST_NAMES AS "Forename",
                                                                                          ad.LAST_NAME AS "Surname"))
                                                            FROM ADDITIONAL_TENANTS ad
                                                            WHERE ad.APPLICATION_ID = 11007219) AS "WRONG")
AS "RESULT"
FROM TENANT a
WHERE a.APPLICATION_ID = 11007219;
Here's the result i get...
<TenantName>
     <Title>Mr</Title>
     <Forename>Theirry</Forename>
     <Surname>Henry</Surname>
     <WRONG>
          <Title>Mrs</Title>
          <Forename>asdASDADS</Forename>
          <Surname>asd</Surname>
          <Title>Dr</Title>
          <Forename>qwe</Forename>
          <Surname>qwe</Surname>
          <Title>Miss</Title>
          <Forename>123</Forename>
          <Surname>123</Surname>
     </WRONG>
</TenantName>
He's what I'm trying to get... (i.e. no nesting)
<TenantName>
     <Title>Mr</Title>
     <Forename>Theirry</Forename>
     <Surname>Henry</Surname>
     <Title>Mrs</Title>
     <Forename>asdASDADS</Forename>
     <Surname>asd</Surname>
     <Title>Dr</Title>
     <Forename>qwe</Forename>
     <Surname>qwe</Surname>
     <Title>Miss</Title>
     <Forename>123</Forename>
     <Surname>123</Surname>
</TenantName>
Hope this is clear. Any help would be greatly received.

This example should work for helping you along
with add_ten AS
(SELECT 'MR' CODED_TITLE_VALUE, 'JOHN' FIRST_NAMES, 'DOE' LAST_NAME FROM DUAL UNION ALL
  SELECT 'MRS','JANE','AUSTIN' FROM DUAL)
select xmlelement("TenantName",
         xmlforest('MR' AS "Title",
                   'UNKNOWN' AS "Forename",
                   'OWNER' AS "Surname"
         (SELECT xmlagg(xmlforest(CODED_TITLE_VALUE AS "Title",
                                  FIRST_NAMES AS "Forename",
                                  LAST_NAME AS "Surname"))
            FROM add_ten
FROM DUAL;
<TenantName>
  <Title>MR</Title>
  <Forename>UNKNOWN</Forename>
  <Surname>OWNER</Surname>
  <Title>MR</Title>
  <Forename>JOHN</Forename>
  <Surname>DOE</Surname>
  <Title>MRS</Title>
  <Forename>JANE</Forename>
  <Surname>AUSTIN</Surname>
</TenantName>

Similar Messages

  • How to display member name and Alias in seperate columns

    Hi,
    We have a report in HFR which has Employee dimension. We set that member display both Member name and alias. But the report showing both in one column with a - seperator. Is there a way to display them in seperate columns.
    Thanks,
    DD

    Thanks Mehmet. But whenever I try to insert a column, it throws this error: You can't insert a column here.
    I have the grid like this.
    Account
    Children of Employee
    I need to display the member name and alias of Employee dimension inseperate columns. Could you Please help me how to do it?
    Thanks,
    Ram.

  • Cannot create Portal System and Alias in System Landscape in Portal

    hallo all,
    i want to install vc, therefore i need to create an Portal System and Alias.
    this i should do in system landscape in the portal
    (System Admin -> System config -> System landscape )!
    but when i open it, it is loading and loading and nothing happens!
    can someone tell me, what problem that could be?
    ep 7.0 is installed and i want to connect to ERP 2005 ECC 6.0.
    regards Vartan

    Vartan,
    The VC needs a portal in order to run - it needs to borrow the core portal and J2EE functionaliy as the VC components only bring in VC specific applications.
    One question to ask, based upon personal experience, is what browser are you using here please? For instance, I've hit this issue when working from Firefox (1.5 or 2.0) but not when I'm running the same link in IE 6.0.
    Just a thought. Let me know how you do.
    Cheers,
    Tim

  • Opening web form in SmartView 11.1.2.103 - display name and alias

    Hi,
    Through some useful forum here, I have upgraded our SmartView, APS and Essbase to version 11.1.2.103 in order to display name and alias in SmartView. However, since I am very new to Hyperion overall, I am still exploring whether it is my limited knowledge with the product or if it's limitation of the product. My client wants to open up an existing web form in SmartView and shoe name and alias in separate columns. Is this possible? I have tried many combinations but I was only able to open up the form in SmartView having name and alias in single column. Any tips and tricks to achieve what I want will be greatly appreciated.
    Thanks,
    Kelly

    This is by design. There was strong customer feedback asking for the ability to show the POV in the first row and not have the POV toolbar on. This feedback came from longtime Essbase customers and partners. If you click the POV button this row gets hidden and you can use the toolbar just like you did in the past in Smart View (no loss of functionality). For Essbase the default is to show the POV on the sheet.
    We have continued improvements planned but here are some of the key point that drove this change:
    1 - Printing the POV - Having the POV on the sheet gives the user the ability to format and print using native Excel functionality.
    2 - Flexible Freeform - With the POV on the sheet the user can easily change their POV or the grid orientation by typing or using native Excel formulas, list features, or VBA.
    3 - Ability to copy grids from one sheet to another with no loss of the POV. Simply copy and paste.
    Hope that clarifies things.

  • Duplicate table and Alias Table

    Hi,
    What is the Differnce between duplicate table and Alias table?which Situation we use these table ?
    Plz tell me .
    Thanks

    Hi,
    If u duplicate the table the join conditions will carry with respective tables , same name appending (Table_Name#1)
    If you duplicate a table in metadata, then that new table (with its new name) must map to a table in the physical database that has new name. If it doesn't exist, the SQL issued will generate an error.
    An alias is a reference to a table that already exists, not a separate database object.
    In case of Alias you need to specify joins conditions explicitly, we can use same table with different constrains to the same dim/fact table
    Alias used, if you need to replicate a physical table and not create multiple tables with the same data or schema
    Thanks,
    Balaa...

  • Kernel messages flood: "Use CAP_NET_ADMIN and alias netdev- instead"

    It's been a while that my kernel.log grows with:
    Jun 20 11:49:16 localhost kernel: [ 178.059030] Loading kernel module for a network device with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev- instead.
    Jun 20 11:49:16 localhost kernel: [ 178.062490] Loading kernel module for a network device with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev- instead.
    dmesg:
    https://gist.github.com/2959155
    lsmod:
    https://gist.github.com/2959158
    Any idea on how to debug?
    thanks.

    besides the message of this topic I have this strange error:
    [ 23.181692] ------------[ cut here ]------------
    [ 23.181707] WARNING: CPU: 1 PID: 123 at net/wireless/reg.c:1806 reg_process_hint+0x2d1/0x460 [cfg80211]()
    [ 23.181708] Modules linked in: tun fuse ctr ccm coretemp arc4 hwmon ath9k ath9k_common intel_rapl x86_pkg_temp_thermal ath9k_hw intel_powerclamp ath3k nls_iso8859_1 uvcvideo ecb hid_generic videobuf2_vmalloc nls_cp437 usbhid ath videobuf2_memops videobuf2_core v4l2_common alx led_class mac80211 cfg80211 hid videodev kvm crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 iTCO_wdt vfat fat btusb joydev bluetooth mousedev iTCO_vendor_support lrw media mdio snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi gf128mul glue_helper snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm snd_timer ablk_helper snd shpchp mei_me mei cryptd i2c_i801 ideapad_laptop soundcore lpc_ich sparse_keymap psmouse ie31200_edac edac_core rfkill serio_raw thermal battery
    [ 23.181752] ac processor wmi evdev mac_hid pcspkr sch_fq_codel nfs lockd sunrpc fscache ext4 crc16 mbcache jbd2 sd_mod crc_t10dif crct10dif_common sr_mod cdrom ahci atkbd libahci libps2 libata ehci_pci xhci_hcd ehci_hcd usbcore scsi_mod usb_common i8042 serio bbswitch(O) i915 button intel_gtt i2c_algo_bit video drm_kms_helper drm i2c_core
    [ 23.181787] CPU: 1 PID: 123 Comm: kworker/1:1 Tainted: G O 3.17.6-1-ARCH #1
    [ 23.181788] Hardware name: LENOVO 20217/VIQY0Y1, BIOS 74CN44WW(V3.05) 09/18/2013
    [ 23.181793] Workqueue: events reg_todo [cfg80211]
    [ 23.181794] 0000000000000000 000000003535fbd0 ffff8802619ebd58 ffffffff81537c3e
    [ 23.181797] 0000000000000000 ffff8802619ebd90 ffffffff8107079d ffff880081dde9c0
    [ 23.181798] ffff88025d198260 ffff880081dde9dc 0000000000000000 ffff88026f257000
    [ 23.181801] Call Trace:
    [ 23.181805] [<ffffffff81537c3e>] dump_stack+0x4d/0x6f
    [ 23.181809] [<ffffffff8107079d>] warn_slowpath_common+0x7d/0xa0
    [ 23.181812] [<ffffffff810708ca>] warn_slowpath_null+0x1a/0x20
    [ 23.181816] [<ffffffffa070c3b1>] reg_process_hint+0x2d1/0x460 [cfg80211]
    [ 23.181820] [<ffffffffa070c5b9>] reg_todo+0x79/0x1a0 [cfg80211]
    [ 23.181824] [<ffffffff81088e05>] process_one_work+0x145/0x400
    [ 23.181828] [<ffffffff810893cb>] worker_thread+0x6b/0x4a0
    [ 23.181830] [<ffffffff81089360>] ? init_pwq.part.22+0x10/0x10
    [ 23.181832] [<ffffffff8108e2ea>] kthread+0xea/0x100
    [ 23.181834] [<ffffffff8108e200>] ? kthread_create_on_node+0x1b0/0x1b0
    [ 23.181837] [<ffffffff8153dbbc>] ret_from_fork+0x7c/0xb0
    [ 23.181839] [<ffffffff8108e200>] ? kthread_create_on_node+0x1b0/0x1b0
    [ 23.181840] ---[ end trace c8f5802f4c737532 ]---
    inbetween normal wifi messages. are they related?
    I have a Lenovo Y510P

  • If I erase the imac hard drive will i lose my Discussion ID and alias ?

    Hi,
    Simply put, If I erase the imac hard drive will i lose my Discussion ID
    and alias
    Thanks.
    Eme.

    Hi Niel.
    So i could register in my name, (as a opposed to beaus) and give the computer a new name (long and short) ?
    Apple care would recognize the changes as long as it is the same serial #,
    Is that correct ?
    Thanks again for your help.
    Eme: )
    Power PC G4 (3.3) iMac ♥ Flat Panel 10.3.9 & 15 Alum.PowerBook Tiger   Mac OS X (10.4.5)  

  • I need to view the available commands and alias on my macbook. also i need to check system log history from terminal

    I think I am missing some stuff in the commands. I need it to show a list of all available to me and alias ....any suggestions?
    <Edited by Host>

    rockymountainblues,
    do you mean commands as in items in the Applications folder, or commands as in things that would be run from within Terminal? What sort of stuff do you think is missing from the commands?
    By aliases, do you mean aliases within the shell that Terminal executes?
    To check your system log history from Terminal, log in as an administrative user and go to /var/log. You should see several files with names that begin with system.log — the ones that end in .gz are inactive and compressed. The file named just system.log is the one that’s currently active.

  • ITunes 10.6.1 and Alias 10.7.3 - Not So Much

    Just read an article in Macworld (US May 2012 pg 54) on moving iTunes Libraries from the built in HDD to an attached HDD and keeping iTunes intact by using the Alias option in Finder.
    Anyone got any ideas on how to get iTunes to use the Alias?
    A search of this forum indicates that others believe it should, the latest Macworld mag says the same......
    So any insight on how to get it to work would be nice.....
    Followed instructions to the letter ..
    ie Copied Library from local HDD to a Firewire800 Drobo (5 hours)
    Closed down iTunes and iTunes Helper - just to be safe
    All Music lived in Music Folder on local HDD now on Drobo folder called Music
    Deleted Music Folder on local drive, then emptied Trash
    Option Command dragged Music Folder back to where old Music folder used to be.
    Started iTunes
    Every track I now try to play now complains the file is missing
    If you check the Get Info in iTunes, after complaining about missing file goes to Summary
    file://localhost/Music/iTunes/+Artists+/J-L/Jethro Tull Discografia/1980 - A/Jethro Tull -'A' - 01 - Crossfire.mp3
    If you go to my local HDD /Music opens the Music folder on the Drobo and has :-
    /iTunes/+Artists+/J-L/Jethro Tull Discografia/1980 - A/Jethro Tull -'A' - 01 - Crossfire.mp3
    So in conclusion it appears that iTunes is not observing the Alias and has therefore 'lost' 40,000 songs

    If you just want to use your music files on the external hard drive you can change your iTunes preferences to point to that hard drive folder, you don't really need to worry about Alias's and as far as I am aware alias's files will not let them be played in iTunes, folders might work as you can in Front row.
    Your current library is complaining because it is looking at your computers hard drive for its music where it is nolonger.
    Rather then edit the path for each, you can just tell iTunes to index your folder on the external hard drive which will then show your music.
    You can either delete your files in iTunes (as they are only references and will give your duplicates if not) or make a new iTunes library pointing to your hard drive (hold down alt when opening iTunes and then select to make a new library).
    To add your external drive music:
    Under the File menu in iTunes select 'Add to Libary' ... then browser to your external hard drive and the folder your music lives in, select the 'Open' button. If you have a lot of music it will take some time, so best to leave it to it.
    Once this has completed adding your files, you will be able to play them as though they were on your computer. Bear in mind that if your external drive goes to sleep, iTunes can make out it can not locate the file, so try to ensure the external drive is active before starting iTunes.
    This wil now mean that you now have your iTunes Library files on your computer, but the media files are on your external hard drive.
    Do bear in mind that if you do not change the Preferences in iTunes to point to this folder on your external drive, it will keep downloading any new files (music from cds/iTunes store, Apps etc) into your computers iTunes folder.
    To change this, go into Preferences...Advanced and select the 'Change' icon and browse to your 'Music' folder on your external drive.
    You can also tick the 'Copy files to iTunes folder when adding to library' and that will ensure all files are moved to the external drive, even if say they sit on your desktop and you add them manually to your iTunes.
    Do bear in mind that if you are not connected to your external hard drive your music files will not play (which can be why having a second library is a plus as you could have some tracks on your computer hard drive for when out and about, then your full library when connected at home).
    I use an external drive on the network to share Music, Films and TV shows around the house computers so that everyone can access them as well as using them on the Apple TVs. It is useful in keeping your computers hard drive slim and enjoying all your entertainment files.
    I hope this helps you.

  • External Hard Drive can't be opened and alias cannot be deleted or fixed

    I've just got a new iMac with Snow Leopard, but my external hard drive won't open.
    1. I have the message *"The alias XXX can't be opened because the original item can't be found"* with the options to delete the alias, fix the alias or OK. I can't delete or fix the alias.
    2. I can see the disk on the Disk Utility, and can verify and repair the disk (which I have done), but cannot verify or repair the Disk Permissions
    3. I can see from get info that of the 1TB capacity, 511GB is used - therefore the files are still on it. I have tried to select new original but am unable to so do as this disk is greyed out in the finder. I have also selected ignore ownership on this volume.
    Any suggestions so I can open the external hard drive, or fix the alias?
    Thanks
    Bill

    Thanks Dave - I tried that but what happened was that the disk, which was in the left hand finder winder with the other devices turned into a cloud and disappeared when I dragged it out of the finder window.
    Any other suggestions? I am keen to be reunited with the files on the external drive
    Thanks
    Bill

  • Fieldpoint IO points are all greyed-out and alias is "unknown"

    the app was originally written in 6i or 6.1 I don't remember. I am updating and adding an Oracle backend. Anyway ...
    Running LabView 7 on Win2K server, MAX 3.2
    in the Fieldpoint IO point controls/indicators, all text is always greyed-out, and when I poll for FP resources, the first part of the string, the alias, shows as "unknown", not the default value = "Fieldpoint".
    What am I missing??
    Lawrence M. David Jr.
    Certified LabVIEW Architect
    cell: 516.819.9711
    http://www.aleconsultants.com
    [email protected]

    Imd2,
    Have you setup your FieldPoint controller and modules in Measurement & Automation Explorer (MAX)? If you are using an Ethernet controller (FP-160x or (c)FP-20xx) then you need to set it up underneath remote systems. If you have a serial controller then you need to set it up under devices and interfaces. If this isn't the issue, then make sure that you have the correct IAK file selected by choosing browse from the FieldPoint I/O Point Control menu (click the down arrow). A configuration window will appear and make sure that you have the correct IAK file selected under the View Configuration tab.
    Ames
    Applications Engineering
    National Instruments

  • Email workflow showing domain and alias and not the name in the email

    I created an email workflow for a specific user field value to receive an email on a trigger event.
    However, the email received shows the DOMAIN/Alias and not the "Name" in the email content.
    How to correct this error? Not sure where is the issue is.
    Sample:
    Hello [%Current Item: Reviewer%] is the greeting line.
    If Reviewer is say Domain A/v-abcd and Name is Abcd.
    The email reads
    "Hello Domain A/v-abcd" and not "Hello Abcd"

    Hi,
    Just select "Display Name" instead of "Login Name" in the "Return field as" field of Lookup dialog.
    It should help.
    Regards Michael (http://sp2013-blog.com)
    Please, don't forget to upvote and mark as an answer if appropriate

  • Duplicate table  and  Alias table in the physical layer

    Hi,
    I want a clear information regarding the duplicate tables in the physical layer of the rpd.
    I mean what is the purpose of the duplicate tables in the physical layer.........
    thanks,
    chinna.

    what do you mean by duplicate of physical table? is it Alias table?
    if then,
    -> aliases are created to break the circular joins (which are not supported by obiee)
    -> and, as per apps standards no operation can be done on base tables which are imported directly to physical layer. Only aliases are joined and will be used in BMM layer
    -> useful to re-use the table more than one time , best example: W_DAY_D in apps rpd
    Edited by: Kishore Guggilla on Sep 23, 2010 10:41 PM

  • Implicit fact and Alias table with

    Hi Gurus,
    May i know what is the use of alias table and implicit fact with some real time scenarios for better under standing.
    Thanks,
    Rafi

    For alias tables, refer to the oracle's documentation here which is explained in great detail: ( http://docs.oracle.com/cd/E14571_01/bi.1111/e10540/physicallayer.htm )
    For implicit fact refer to the oracle's documentation here: ( http://oracle-bi.siebelunleashed.com/articles/implicit-fact-column/ ) . To define in layman's terms, implicit fact is set on a subject area when you are reporting out of dimensions in the report without any fact columns and you want the fact table to be part of the report's query.

  • OS X Server 10.9 vhost and alias is very slow?

    Hi.
    I'm using OS X Server with Mavericks.
    I have configured vhosts at my provider to point to my IP, and I would like to use those to serve webpages and be able to access them remotely to show my work to customers.
    What I have discovered is that requests to vhosts on my OS X Server other than the default site are extreemely slow. (30 seconds+)
    So I figured I would use aliases instead under the default site and point them to my development directory. No success, i'm still looking at 30s+
    To sum it up.
    Example.
    sandbox.somedomain.com (Server Website) serves content properly.
    Creating host1.somedomain.com is extreemely slow.
    Creating sandbox.somedomain.com/alias on (Server Website) is extreemely slow.
    I have tried to disable ipv6, created local DNS, edited /etc/hosts and so on.
    If I do the same thing on my Windows PC, everything works and it's serving pages normally.
    Any ideas?

    Many Open Directory problems can be resolved by taking the following steps. Test after each one, and back up all data before making any changes.
    1. The OD master must have a static IP address on the local network, not a dynamic address.
    2. You must have a working DNS service, and the master's hostname must match its fully-qualified domain name. To confirm, select the server by name in the sidebar of the Server application window, then select the Overview tab. Click the Edit button on the Host Name line. On the Accessing your Server sheet, Domain Name should be selected. On the Accessing your Server sheet, change the Host Name, if necessary. The server must have at least a three-level name (e.g. "server.yourdomain.com"), and the name must not be in the ".local" top-level domain, which is reserved for Bonjour.
    3. The primary DNS server used by the master must be 127.0.0.1 (that is, itself) unless you're using another server for internal DNS. The only DNS server set on the clients should be the internal one, which they should get from DHCP if applicable.
    4. Follow these instructions to rebuild the Kerberos configuration on the master.
    5. If you use authenticated binding, check the validity of the master's certificate. The common name must match the hostname and domain name. Deselecting and then reselecting the certificate in Server.app has been reported to have an effect in some cases.
    6. Unbind and then rebind the clients in the Users & Groups preference pane. Use the fully-qualified domain name of the master.
    7. Reboot the master and the clients.
    8. Don't log in to the server with a network user's account.
    9. Export all OD users, delete them, turn off OD, turn it back on, and import. Ensure that the UID's are in the 1001+ range.

Maybe you are looking for