Need to select XMLTYPE data in unindented form, from a query.

I need to select XMLTYPE data among relational data as an xml element.
SELECT
  XMLSERIALIZE(DOCUMENT
  XMLELEMENT ("Account",
      XMLATTRIBUTES (LPAD(ROWNUM, 10 , '0')        AS "recordId"    )
       ,XMLELEMENT ("Header"
           ,XMLELEMENT ("AccountId"
              ,XMLELEMENT ("AccountNumber"          ,car.acc_nbr              )))
              ,XMLELEMENT ("CreditPurpose"            ,car.credit_purp           )
             ,XMLELEMENT ("AccountType"              ,car.acc_type              )
            , (cdx.cus_dtls)  -- /*THIS IS XMLTYPE data*/
  ))AS crdtrpt
FROM  cus_acc_rpt car , cus_dtls_xml cdx
WHERE car.ar_id = cdx.ar_id
Here cdx.cus_dtls need to be selected in unindented form (each records as a long unbroken string of data). So that I can SPOOL huge number of records in lesser time.
I am trying to convert this into CLOB and Insert into CLOB type column of a table.
But XMLSERIALIZE does not seem to serialize the xml data in cus_Dtls column.
However it does serialize the xml typ data selected other than cus_dtls.
Any quick hints to meet the requirements will be very welcomed !!
Cheers !!
Saxena

Use XMLSerialize with NO INDENT option :
SELECT XMLSERIALIZE(DOCUMENT
         XMLELEMENT ("Account",
         NO INDENT
       )AS crdtrpt
FROM  cus_acc_rpt car , cus_dtls_xml cdx
WHERE car.ar_id = cdx.ar_id

Similar Messages

  • How to read data in binary form from file?

    Hi,
    i try to write an implementation of LZW. I need to read data in binary form from a file. How can i do that? I cannot find something like "binary input stream" ...
    Thanks

    Hi,
    i try to write an implementation of LZW. I need to
    read data in binary form from a file. How can i do
    that? I cannot find something like "binary input
    stream" ...
    ThanksInputStream reads bytes. I don't understand your question.

  • I Want to Select a Date for a Form Field Using a Calendar Instead of Manually entering a date.  Is this possible?

    I want to be able to select a date by clicking on the field and a calendar pops up allowing me to select a date from the calendar that will then populate that field.  Can someone help me accomplish this?

    Thom Parker has a free JavaScript PopUp Calendar here:
    http://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm

  • Form blows up when clicked in data block using a FROM clause query

    Hi,
    I have a form that has two blocks. The detail block is based on a "FROM query clause" in the 'Query Data Source Type' in the block Properties.
    I have a simple select in the 'Query Data Source Name'.
    I made sure the select is enclosed in parenthesis and the alias names in the SELECT are the same as the ITEMS defined in the block
    The data needs to be displayed in a tabular fashion.
    When I run the form, the data is displayed correctly..but when I click the mouse on any item of this block or try to scroll down, everything just blows up and it closes my form.
    I have made sure both blocks have the same properties. But, this seems to happen no matter what.
    Any help in regard is greatly appreciated.
    Thanks much,
    Vijji

    This is how I set the relationship for the detail block say BLOCK2.
    1. I first do this:
    Database Data Block = YES
    Query Allowed = YES
    Query Data Source Type = FROM clause query Query Data Source Name = ( select jio.order_header_id order_header_id, jii.item_code item_code, SUM(jii.item_qty) item_qty from joe_indv_items jii, joe_indv_orders jio where jii.indv_order_id = jio.indv_order_id group by jio.order_header_id, jii.item_code )
    The master and detail need to be tied by the order_header_id which I can get from the header block.
    2. In the WHEN-NEW_BLOCK-INSTANCE trigger for BLOCK2, I wrote the following where I dynamically pass the order_header_id:
    DECLARE
    q varchar2(1000);
    BEGIN
         q := '(SELECT jio.order_header_id order_header_id,
         jii.item_code item_code,
         SUM(jii.item_qty) item_qty
         FROM joe_indv_items jii, joe_indv_orders jio
         WHERE jio.order_header_id = ' || :HEADERS.order_header_id||'
         AND jii.indv_order_id = jio.indv_order_id
         GROUP BY jio.order_header_id, jii.item_code )';
         CLEAR_BLOCK;
    SET_BLOCK_PROPERTY('BLOCK1', QUERY_DATA_SOURCE_NAME, q);
    EXECUTE_QUERY;
    END;
    I am not sure if I should write the exact select statement in the Query Data Source Name or not.
    Please advice.
    Thanks much,
    Vijji

  • Issue while reflecting the data to ADF form from ADF Table

    Hi All,
    I have one scenario as follows:
    I have to open a form in entry mode. So I have used a Method Call activity in task flow to call "Create" in method call activity.
    Then form opens in a entry mode. I have a adf table in the page showing the entered data.
    When form opens in entry mode, instead of entering the values in the field User selects a record in ADF table, but due to the create mode of the form it will through me a error to fill mandatory fields.
    Please tell me the way so that if user selects the record(in adf table) instead of entering new record, the value would reflect in the Adf form.
    If I use a roll back on selecting the row of ADF table, then it is showing me this error "Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[null ]" because there will be no row key in the cache when form opens.
    Please suggest me the way to complete the task.
    I am using jdeveloper 11.1.2.1.0
    Thanks,
    Gobi
    Edited by: gobinkl on Oct 3, 2012 2:06 AM

    no no your are complicating yourself. :) better your should provide your usecase.
    first thing: go through the books & also adf blogs learn and understand the framework. as above person said.
    i hope that you had method call create as activity as default while page rendering it make your af: form empty(that is ready fir insertion format).
    so if your are doing like that.am sure it will throw some mandatory errors.
    error will not resolve unless without entering any data's.
    coming af:table why are using af:table - immediate = true / false(switching).
    immediate = true - skip over validation or by pass some validation in some phase - based on the component which you are using. (say as if you are using editable value holder,af:coomand button).
    grab the information here in an more legible manner.
    http://adfpractice-fedor.blogspot.in/2012/02/understanding-immediate-attribute.html
    let me know your usecase.
    this will assist you
    https://blogs.oracle.com/shay/entry/executing_an_action_on_jsf_pag
    http://tanveeroracle.blogspot.in/2009/09/adf-11g-createinsert-to-display-blank.html
    Edited by: user707 on Oct 5, 2012 9:02 AM

  • Sending Data to PDF Forms from ABAP Program.

    Hi Experts,
    I left ABAP Programing for a while around 1+ years Due to some personal problems
    Now I have struck up with new issue. Its ADOBE PDF forms.
    I am Entirely new to this topic & knows about Nothing.
    My requirement is to display a report in PDF form. Its totally Independent form from NACE.
    I have written a Driver program & retrieved all the DATA into a Final internal table.
    Now All that I need is to display the same Internal Table data into PDF form output.
    Can anyone help me how to send this data(47 records in Internal table with 8 fields in Internal table) to PDF.
    Please help me out Experts with any suggestions.
    Thanks & Regards,
    Dileep .C

    Hi,
    if u pass your internal table to smartform we can achieve . because we can convert smartform output into pdf easily.
    Regards,
    karthikeyan k s,
    Edited by: karthikeyanks on Nov 19, 2010 12:58 PM

  • Selectively transfer data to new ipad from backup

    My 64gb 1st generation ipad was recently stolen.  I do, however, have a recent backup stored on my macbook pro.  I would like to replace my ipad and restore my old data, however I am cheap and feel that 16gb should be sufficient for my needs.  I was wondering whether restoring from the backup will work, given the difference in the hard drive size (the size of the backup folder on my mac pro is 46gb).  Most of the old data is movies which I don't need.  However, there is <1gb of critical data (personal notes) which I desperately want to see again.  Is there any way to selectively recover this data?  Thanks!

    Sounds like I'm stuck then.  I found one forum thread that suggested you could trick the ipad into selectively overlooking data from certain apps during restore by deleting them from itunes (https://discussions.apple.com/message/23622388?searchText=Selectively%20transfer %20data%20to%20new%20ipad%20from%20backup#23622388).  If true, I think this could solve my problem since most of the data is from a single app. Do you think this could work?
    Thanks for your help, Diavonex!

  • I need to up my Data usage to 10G from 5 G help  Can anyone tell me where to go for this?

    I need to up my Data usage to 10G

    All you hsve to do is log into your account and then got to the change Options tab or click https://nbillpay.verizonwireless.com/vzw/accountholder/services/viewFeatures.action and make change to the feature that you want to change and save changes.

  • Make Dynamic Form from sql query

    Hi... i'm trying to create a VO with sql query, but the attributes for this Vo are should made from rows from sql query not from columns, how i can do this?
    example
    NOMCAMPODATOS -- ORDENBLKWEB
    PLANMINFIANZAS --
    SERIEID -- 5
    CODREMOLQUE -- 4
    CODFORMPAGO -- 24
    CODCIUDAD -- 13
    DIREC -- 10
    EMAIL -- 17
    FECFINVIG -- 20
    VO example
    attributes:
    PLANMDIANZAS NUMBER
    SERIEID NUMBER
    CODREMOLQUE NUMBER
    ETC..
    Edited by: JLopezJujuy on 18-dic-2012 10:01

    Try a PIVOT operator in your SELECT command, or one of the other ways to turn rows into columns. Look in the SQL manual for more information, or ask in the SQL and PL/SQL forum.
    By the way, this doesn't sound like a very good database design. Have a look at this "Ask Tom" thread for a discussion about what is wrong with it - http://asktom.oracle.com/pls/apex/f?p=100:11:0::NO::P11_QUESTION_ID:10678084117056

  • Need some help on data encryption in Forms 6i with Oracle Database.

    Hi,
    Here is my requirement:
    I have a username and a password field, and i can add new users to it and ofcourse set a password for it.This password will be visible as asteriks on the forms but i want it to entered in the encrypted format in the database in the designated table.Can anyone help me with this.(hope my question is clear!!!)
    Thanks,
    Aparna.
    null

    Hi,
    try it in the follwing very simple way:
    translate each character of the password to it's ascii value and add a constant value you like. e.g. i = asc(substr(pwstring,i,1)) + k. concatenate each char-value of i(whitch have to be a fix length string of f.e. 4 digits) to build op the encrypted string. you can rich up this by calculating k in differents ways like:
    K = offset + i. and by the way this encryption can call n times, mean encrypt the encryption, if you want.
    the decryption is yout turn ;-)
    hope this will help you...
    Regrads
    biki
    null

  • I need to replace my data on iCloud former mobil me

    anyone knows how to replace my data on mobil me, not sure how to do it since i moved to Icloud.

    if you have  Lion/Mountain LIon Mac and iOS5 or 6 devices you can sync email, calendars, contacts, bookmarks, and iWork documents. There is no general file storage in the manner of the iDisk. What data exactly are you trying to replace, and where?

  • How to export level0 data in COLUMNAR form from an ESSBASE ASO application?

    Hello,
    I am in the need to export the level0 data from as 11.1.1.3 Essbase ASO application in COLUMNAR form.
    please note that the size of the db is 6GB and report script failed.
    Is it possible? please sugesst a way.
    thanks,
    Ankit

    y dont you use report script
    few tips to for build report script when you have huge data
    1. Decrease the amount of Dynamic Calcs in your outline. If you have to, make it dynamic calc and store.
    2. Use the <Sparse command at the beginning of the report script.
    3. Use the <Column command for the dense dimensions instead of using the Page command. The order of the dense dimensions in the Column command should
    be the same as the order of the dense dimension in the outline. (Ex. <Column (D1, D2)).
    4. Use the <Row command for the sparse dimensions. The order of the sparse dimensions in the Row command should be in the opposite order of the sparse
    dimension in the outline. (Ex. <Row (S3, S2, S1)). This is commonly called sparse bottom up method.
    5. If the user does not want to use the <Column command for the dense dimensions, then the dense dimensions should be placed at the end of the <Row command.
    (Ex. <Row (S3, S2, S1, D1, D2)).
    6. Do not use the Page command, use the Column command instead.
    this will work trust me

  • I am trying to create a Form that will act as a list.  I want to import data into the form from exce

    My table has a list of names with product information in corresponding columns.  I want to create a form that I can import this into where every row makes a new part of the form list I create.  Is this possible?
    Example of what I have in excel:
    Name
    Product 1
    Product 2
    Product 3
    Total
    a
    1
    2
    3
    6
    b
    0
    3
    4
    7
    c
    1
    3
    4
    8
    d
    1
    3
    5
    9
    Example of what I want in Form:
    Customer a    1     2     3     6
    Customer b    0     3     4     7
    etc.
    I want to put this info into a form to make it more presentable.  Can anyone help me with this?

    Look at the Import/Export form data functionalities already built-in into Acrobat.

  • Help needed in Loading excel data to staging table from OAF Page

    Hi All,
    We have a requirement from the client on loading of a excel sheet data into staging table using OAF page.
    We were able to load a CSV file into staging table via OAF. The approach we used is we created a item of style 'messageFileUpload', which would pick the CSV file from desktop and we wrote the logic on the controller to place the file into server and then sumit a concurrent program to load the data into the staging table.
    But client wants data from the excel file to be loaded into staging table. Is there any way(approach) by which we can convert the excel file data into .CSV file using OAF?
    Any help or pointers on this will be highly apperciated.
    Thanks,
    Chethana

    Hi,
    Read through this :
    Need to upload a CSV/Excel to a table in OAF page
    Thanks,
    Gaurav

  • Selection and data binding in a large BW query...

    Hi,
    I've created a dashbaord using Present 2008. It uses a BW query that returns a fairly large amount of data (around 9K-10K rows in Excel). In the initial version of the dashboard I was using a map with individual pushbuttons on it representing locations for my corps "offices" (reduced down to large "dots'). The dashboard displays quite a large number of metrics so for each location the query returns a block of data around 50 rows by 12 columns from which I pull each metric and display it, typically, in either a chart or the "value" component.
    The problem - binding data to each button this way is easy. When the user pushes the button, I select the 50 X 12 area as source and a similar area for the destination. If I wanted to move to using a different selector (like a combobox), e.g. the map isn't greatest metaphor for some metrics, how do I bind that much data to one of the label-based selectors? I've tried several different ways to do this but XCelsius seems to balk at using that amount of data. I tried using filtered rows by labeling each location and it seemed it limited the amount of data to around 500 rows or so.
    So, I am just going about this wrong way or misunderstanding how to bind the label-based selectors to that amount of data or is this not possible?
    Please bear in mind I'm relatively new to XCelsius and have only been using it off and on for a few weeks and I welcome any attempts to alleviate my ignorance.

    "click="{requestNode(rp.currentItem.id);}" will not work
    because the "currentItem" only exists when the repeater is
    rendering and not when the click event happens. Try this:
    click="{requestNode(rp.getRepeaterItem().id);}"
    If that does not work like it is, look up getRepeaterItem in
    the docs, I may not have the syntax exactly right.
    Tracy

Maybe you are looking for

  • How to display WHO columns in oracle apps form

    Hi all, I have WHO columns in the Table and i need to add in the existing form and i have WNI trigger (execute_query) and i am trying to add columns in the Existing Database Block After opening the Form(oracle apps form) i am not getting/populate any

  • HT5035 How can I find out how much is left on my iTunes gift card?

    I put a $50 iTunes gift card on my sons IPAD 2. How can I check from time to time how much of a balance he has?

  • Integration Process Config SAP Hana Cloud integration with SuccessFactors

    Dear, We are trying to connect SF with our SAP backend, I'm currently reading the following document: "Integration Add-On 3.0 for SAP ERP Human Capital and SF". I'm fairly new to SAP so I have a few questions, since I didn't found the answer on the r

  • SUM over more than 1 column

    Hi, I want to summate the values in more than 1 column. My code is like this SELECT SUM(Column_A + Column_B) AS Column_C FROM TABLE GROUP BY ID but this doesn't work. I also tried SELECT SUM(Column_A & Column_B) AS Column_C FROM TABLE doesn't worked

  • Arturia Minibrute bpm sync to GB

    hi, thinking of getting the minibrute synth. One question . How do i sync the minbrute to a drum loop in GB . Does it happen automatically or do I have to open some menus. I tend to play free and not sequenced up until now so dont know about MIDI rea