XML not generating when null data present in the table

Lets consider employee and dept tables and say one employee works in multiple departments,
Dept table data:
case1:
emp_id     dept_name      dept_id
1     Oracle     55
1     Datawarehouse     56
case 2:
emp_id     dept_name      dept_id
2     Oracle     55
2     Datawarehouse     56
2     Clearing House     
2     Java     
In Production environment, the below code generates xml for case 1 but not for case 2. In test environment , xml is getting generated for both the cases. It looks like null handling issue but why the same code behaves differently in qa and prod. dbms_xmlgen.getXML is not generating any exceptions. Any help would be appreciated.
DECLARE
ctx dbms_xmlgen.ctxHandle;
xml CLOB;
emp_no NUMBER := 7369;
i PLS_INTEGER;
BEGIN
ctx := dbms_xmlgen.newContext('SELECT emp_id,name,salary, cursor(select emp_id, dept_name,dept_id from dept b where a.emp_id=b.emp_id) FROM emp a WHERE a.empno = '|| emp_no);
xml := dbms_xmlgen.getXML(ctx);
i := dbms_xmlgen.getNumRowsProcessed(ctx);
dbms_output.put_line(TO_CHAR(i));
END;
Edited by: user512219 on May 22, 2012 12:52 PM

Give the database version anyway, it could be a known bug.
Are the NULL column(s) part of the join predicate?
It's difficult to help in this situation, nobody but you has the real test case, so try to give as much details as possible.
Wild guess : does this make a difference?
dbms_xmlgen.setNullHandling(ctx, dbms_xmlgen.EMPTY_TAG);Edited by: odie_63 on 22 mai 2012 23:40

Similar Messages

  • HTML tags not displayed when using Data Template

    Hi All...
    I'm developing a BI Publisher report in which one of the columns is a clob data type. I'm using an xsl stylesheet to format the data present in the clob column.
    I've developed the report using data template as the data set. The problem is the clob column which has the HTML tags where not displayed properly...for example
    the tag starting with
    <
    is replaced with
    & lt;
    I did a couple of searches in this forum and in tim's blog but couldn't find a proper solution...
    http://blogs.oracle.com/xmlpublisher/2007/01/formatting_html_with_templates.html
    API and HTML Formated Content
    Re: Problem with text data elements containing escaped HTML codes
    HTML Output from CDATA
    Re: HTML formatted output
    Re: Special characters in CLOB are making report fail
    Re: Formatting of HTML tag problem
    I'm using BI Publisher standalone:Release 10.1.3.2. In one of the threads..
    Re: Special characters in CLOB are making report fail
    I came to know that data template cannot generate proper HTML tags for release 10.1.3.2. Is there any work around way to get the proper HTML tags when data template is used as a data set?
    Thanks in Advance...
    Edited by: user10280715 on Dec 9, 2008 3:13 PM

    Issue could be with the data that is selected in the other environment. It generally happens that the ALV will not give the same results as in the DEV in the other systems.
    Possible errors could be the control break statements in the loop...endloop block. validate the correctness of the control break stmts if any.

  • Batch quantity not deducting when FIRST date (for line item) is in future.

    Hi Folks,
                My requirement is when creating sales order for batch managed materials, if  i give any quantity with future date that is,
    if todays date is 02.07.2010 and if i create sales order..
    material    => mat1
    Quantity   => 20     
    Date   => 12.07.2010     (this is not required delivery date,this is first delivery date in schedule line for that item)
    Batch  => B1
    and initially if Batch B1 has quantity 100 ,after saving this sales order, the quantity must be 80.
    but its not deducting, for future dates ,thats why the same batch is showing quantity 100, next time
    when i m creating new sales order.where as it should show 80.
    where exactly the quantity deduction is carried out (include or PAI PBO modules).
    any hints.
    I appreciate your response.
    Thanks

    Hi Folks,
                My requirement is when creating sales order for batch managed materials, if  i give any quantity with future date that is,
    if todays date is 02.07.2010 and if i create sales order..
    material    => mat1
    Quantity   => 20     
    Date   => 12.07.2010     (this is not required delivery date,this is first delivery date in schedule line for that item)
    Batch  => B1
    and initially if Batch B1 has quantity 100 ,after saving this sales order, the quantity must be 80.
    but its not deducting, for future dates ,thats why the same batch is showing quantity 100, next time
    when i m creating new sales order.where as it should show 80.
    where exactly the quantity deduction is carried out (include or PAI PBO modules).
    any hints.
    I appreciate your response.
    Thanks

  • How do I enlarge the "presenter notes" window when running my presentation on an external display?

    In the latest version of Keynote, the "Presenter Notes" window is a small horizontal field at the bottom of the presenter's computer screen.  Only 3-4 lines of text can be seen.  This means that when you have a few paragrahs of notes, you have to scroll through them as you are presenting.  This is very cumbersome.  In the previous version of Keynote you could change the relative size of the slides versus the "presenter's notes" boxes when running a presentation on an external display, but in the new version, I can't find a way of enlarging the "presenter's notes" field.
    Also, in the new version, the preview slide doesn't show the initial text on the next slide if that text emerges as a "dissolve in" build when you advance forward through your slides.  I always have the initial text on my slides automatically "dissolve in" after each slide transtion.  But in the new version of Keynote, when in presenter mode, I can't see any of the text on the "next slide."  This makes it difficult to anticipate what slide comes next . . . without going to the Navigator.  Does any one have a solution for this?
    Thank you.

    I figured it out with the help of a post from a few days ago.  Although posted for a different problem, I followed these steps from Cornelia-I and it worked like a charm:
    You can change the link of LR to the images from the network drive to your local drive, best done on parent folder level: right-click the highest folder in library left panel, and choose update storage location. In the opening dialog window point it to your internal folder.

  • Change pointers are not generated when creating a material master

    Dear Experts,  
    Change pointers are not generated when creating a material master. 
    However, when a change is made to the already created material, the change pointers are created according the fields in BD52.  
    Am I missing any settings?
    I need to create change pointers immediately when I create the material master in MM01.  
    Please suggest. 
    Regards,
    Shetty

    did you follow the steps given in
    http://help.sap.com/saphelp_nw73/helpdata/en/4a/6dcbe9c95261a3e10000000a421937/frameset.htm

  • How to generate test data for all the tables in oracle

    I am planning to use plsql to generate the test data in all the tables in schema, schema name is given as input parameters, min records in master table, min records in child table. data should be consistent in the columns which are used for constraints i.e. using same column value..
    planning to implement something like
    execute sp_schema_data_gen (schemaname, minrecinmstrtbl, minrecsforchildtable);
    schemaname = owner,
    minrecinmstrtbl= minimum records to insert into each parent table,
    minrecsforchildtable = minimum records to enter into each child table of a each master table;
    all_tables where owner= schemaname;
    all_tab_columns and all_constrains - where owner =schemaname;
    using dbms_random pkg.
    is anyone have better idea to do this.. is this functionality already there in oracle db?

    Ah, damorgan, data, test data, metadata and table-driven processes. Love the stuff!
    There are two approaches you can take with this. I'll mention both and then ask which
    one you think you would find most useful for your requirements.
    One approach I would call the generic bottom-up approach which is the one I think you
    are referring to.
    This system is a generic test data generator. It isn't designed to generate data for any
    particular existing table or application but is the general case solution.
    Building on damorgan's advice define the basic hierarchy: table collection, tables, data; so start at the data level.
    1. Identify/document the data types that you need to support. Start small (NUMBER, VARCHAR2, DATE) and add as you go along
    2. For each data type identify the functionality and attributes that you need. For instance for VARCHAR2
    a. min length - the minimum length to generate
    b. max length - the maximum length
    c. prefix - a prefix for the generated data; e.g. for an address field you might want a 'add1' prefix
    d. suffix - a suffix for the generated data; see prefix
    e. whether to generate NULLs
    3. For NUMBER you will probably want at least precision and scale but might want minimum and maximum values or even min/max precision,
    min/max scale.
    4. store the attribute combinations in Oracle tables
    5. build functionality for each data type that can create the range and type of data that you need. These functions should take parameters that can be used to control the attributes and the amount of data generated.
    6. At the table level you will need business rules that control how the different columns of the table relate to each other. For example, for ADDRESS information your business rule might be that ADDRESS1, CITY, STATE, ZIP are required and ADDRESS2 is optional.
    7. Add table-level processes, driven by the saved metadata, that can generate data at the record level by leveraging the data type functionality you have built previously.
    8. Then add the metadata, business rules and functionality to control the TABLE-TO-TABLE relationships; that is, the data model. You need the same DETPNO values in the SCOTT.EMP table that exist in the SCOTT.DEPT table.
    The second approach I have used more often. I would it call the top-down approach and I use
    it when test data is needed for an existing system. The main use case here is to avoid
    having to copy production data to QA, TEST or DEV environments.
    QA people want to test with data that they are familiar with: names, companies, code values.
    I've found they aren't often fond of random character strings for names of things.
    The second approach I use for mature systems where there is already plenty of data to choose from.
    It involves selecting subsets of data from each of the existing tables and saving that data in a
    set of test tables. This data can then be used for regression testing and for automated unit testing of
    existing functionality and functionality that is being developed.
    QA can use data they are already familiar with and can test the application (GUI?) interface on that
    data to see if they get the expected changes.
    For each table to be tested (e.g. DEPT) I create two test system tables. A BEFORE table and an EXPECTED table.
    1. DEPT_TEST_BEFORE
         This table has all EMP table columns and a TEST_CASE column.
         It holds EMP-image rows for each test case that show the row as it should look BEFORE the
         test for that test case is performed.
         CREATE TABLE DEPT_TEST_BEFORE
         TESTCASE NUMBER,
         DEPTNO NUMBER(2),
         DNAME VARCHAR2(14 BYTE),
         LOC VARCHAR2(13 BYTE)
    2. DEPT_TEST_EXPECTED
         This table also has all EMP table columns and a TEST_CASE column.
         It holds EMP-image rows for each test case that show the row as it should look AFTER the
         test for that test case is performed.
    Each of these tables are a mirror image of the actual application table with one new column
    added that contains a value representing the TESTCASE_NUMBER.
    To create test case #3 identify or create the DEPT records you want to use for test case #3.
    Insert these records into DEPT_TEST_BEFORE:
         INSERT INTO DEPT_TEST_BEFORE
         SELECT 3, D.* FROM DEPT D where DEPNO = 20
    Insert records for test case #3 into DEPT_TEST_EXPECTED that show the rows as they should
    look after test #3 is run. For example, if test #3 creates one new record add all the
    records fro the BEFORE data set and add a new one for the new record.
    When you want to run TESTCASE_ONE the process is basically (ignore for this illustration that
    there is a foreign key betwee DEPT and EMP):
    1. delete the records from SCOTT.DEPT that correspond to test case #3 DEPT records.
              DELETE FROM DEPT
              WHERE DEPTNO IN (SELECT DEPTNO FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3);
    2. insert the test data set records for SCOTT.DEPT for test case #3.
              INSERT INTO DEPT
              SELECT DEPTNO, DNAME, LOC FROM DEPT_TEST_BEFORE WHERE TESTCASE = 3;
    3 perform the test.
    4. compare the actual results with the expected results.
         This is done by a function that compares the records in DEPT with the records
         in DEPT_TEST_EXPECTED for test #3.
         I usually store these results in yet another table or just report them out.
    5. Report out the differences.
    This second approach uses data the users (QA) are already familiar with, is scaleable and
    is easy to add new data that meets business requirements.
    It is also easy to automatically generate the necessary tables and test setup/breakdown
    using a table-driven metadata approach. Adding a new test table is as easy as calling
    a stored procedure; the procedure can generate the DDL or create the actual tables needed
    for the BEFORE and AFTER snapshots.
    The main disadvantage is that existing data will almost never cover the corner cases.
    But you can add data for these. By corner cases I mean data that defines the limits
    for a data type: a VARCHAR2(30) name field should have at least one test record that
    has a name that is 30 characters long.
    Which of these approaches makes the most sense for you?

  • Not displaying the data in to the table..wht is the issue

    I have problem for the displaying the RFC Model object date in to the table.
    I have created the Table in the view, Then  i have choosed  the "create  binding" option in the outLine window to map the perticular RFC model object to the Table to display. The data is not displaying in the table . But the RFC model object contains data. when i am trying to display with MessageMaganger.reporSuccess(). it is diplaying the data.
    Can any one tell me what is the issue.

    First, in your view layout in NWDS,  look at the tableview,  do you see fieldnames in the columns and rows.  If so, then I believe that you have bound correctly.    Also, in your executeBAPI method,  make sure that it looks something like this.
        public void executeBapi_Gl_Acc_Getlist_Input( )
        //@@begin executeBapi_Gl_Acc_Getlist_Input()
        try{
             wdContext.currentBapi_Gl_Acc_Getlist_InputElement().modelObject().execute();
        catch (Exception ex)
                  ex.printStackTrace();
    <b>    wdContext.nodeOutput().invalidate();</b>
        //@@end
    Regard,
    Rich Heilman

  • My ipad mini does not restart when i press and hold the home and power buttons for a minute or more. what do i do? i really need to access some information on it. please help.

    my ipad mini does not restart when i press and hold the home and power buttons for a minute or more. what do i do? i really need to access some information on it. please help.

    You need to connect to iTunes and restore.
    iOS: Not responding or does not turn on
    You may need to put the device into recovery mode, this is covered in the link on this page.
    Did you back up the device?

  • After hard drive crash I needed to authorise my pc again. itunes tells me iphone cannot sync as pc not authorised. when I try to authorise the pc, itunes tells me pc is already authorised... what can i do?

    After a recent hard drive crash I needed to authorise my pc again. I first de-authorised all previous computers (there was no other option)
    Then I authorised the pc with the new hard drive.
    then I tried to sync
    Then itunes tells me iphone cannot sync as pc not authorised.
    when I try to authorise the pc, itunes tells me pc is already authorised...
    I have been playing this game 10 times now ... "cannot sync because pc not authorised" and then "cannot authorise as already authorised"
    what can i do?
    thanks

    yes, a few times. the number of authorised computers decreases and increases from zero to one and vice versa accordingly. yet I am still being told that it cannot sync.

  • I have Cisco TelePresence SX10 and content sharing is not working when I am dialing through the bridge

    I have Cisco TelePresence SX10 and content sharing is not working when I am dialing through the bridge, I can share the content if I drag and drop from RMX, but if schedule the call in Resource manager or manually dial in from device the content is not going to other hand, I have tried to turn off encryption as well but still same issue. can you please help me out with this. I am from Lion co and purchased sx 10 recently.
    regards
    Hemang

    Can you please provide us with a little more information on your systems and configuration / topology, such as, what call control are you using (Cisco VCS, CUCM, other?). what type of "Bridge" are you using (is this a Cisco MCU, or Cisco TelePresence Server, or other device?), what versions of the software are on each of the devices, etc.  The more information we have about your environment will help us assist you better.  But saying that, if all your core equipment isn't Cisco, you may have more luck in the forums for the manufacturer of such equipment (ie Polycom's Support Community).
    Wayne
    Please remember to rate responses and to mark your question as answered if appropriate.

  • To determine the count when range is present in the select option

    hai!
         i want to know how we can determine the count(number of values) when range is present in the select option.
    helpful answers will be rewarded.
    thanks & regards,
    raghavendra kulkarni.

    refer my reply in the other thread
    select <field>
    from <master table>
    into table itab
    where <key field> in <range/select-option> .
    describe table itab lines v_lines.
    or
    count = sy-dbcnt.
    Regards,
    ravi

  • Eventhough data present in the D Drive (Database files), E Drive (.Pag) files, we can see data is coming as zero in Excel retrival.

    Eventhough data present in the D Drive (Database files), E Drive (.Pag) files, we can see data is coming as zero in Excel retrival. Can anyone help me to figureout this issue.
    Thanks,
    SRI

    Hi
    Verify the below details:
    1. Whether your app/db started successfully.
    2. Check the database properties :
    Storage tab - .ind and .pag  exits.
    Statistics tab -  whether any number exists in "number of existing blocks" and "existing level 0 blocks"
    3. If all the above properties in esbase are fine then check your excel add-ins options settings while retrieval.
    Thanks

  • My sistem preferences are not working, when I try to change the photo of the desk It stop working, what can i do?

    my sistem preferences are not working, when I try to change the photo of the desk It stop working, what can i do? I'm dieing cause I'm afraid

    Have you tried resetting your device by pressing and holding the Home button and power button until the silver apple appears?

  • Touch ID in my iPhone six does not work when it's plugged  into the wall is anybody else having this problem?

    i've noticed a touch ID only works with my iPhone six is not plugged into the wall was soon as I plug it in it doesn't work anymore doesn't even register fingerprint.

    Charger60 wrote:
    i
    Touch ID in my iPhone six does not work when it's plugged  into the wall is anybody else having this problem?
    No. You are the only one. The way I know is that I don't have the problem, therefore no one else can have it.
    Seriously, no matter what problem you have, with a half billion iPhones in use, someone else will have the same or similar problem. So knowing that doesn't help solve it in the slightest. As it's new and still in warranty I would take it to an Apple store. Make a genius bar appointment first so you won't have a long wait.

  • HT3819 When I sync my iPod some of my purchases from iTunes transfer, but some do not.  When I try to drag the songs onto the iPod icon it shows the 'crossed out' symbol and won't move them.

    When I sync my iPod some of my purchases from iTunes transfer, but some do not.  When I try to drag the songs onto the iPod icon it shows the 'crossed out' symbol and won't move them.  I've tried synching from multiple computers that are all connected with home sharing but it still didn't do the trick.

    Installing iTunes does not cause content to magically appear on the computer.
    Your media is only where you put it.
    iOS devices are not backup devices.
    Copy the media from the old computer to the new computer.

Maybe you are looking for