Bug in SQL Developer relating to handling of XMLTYPE columns

Hi,
I have found a bug in SQL Developer relating to its handling of XMLTYPE columns.
Given a table with the following data:
ID, XML_DATA
1, <xml here>
2, <xml here>
3, <xml here>
And the following SQL to extract a value from the XML and also an XML fragment as an XMLTYPE:
SELECT
EXTRACTVALUE(t.column_value,'/*/USER_ID/text()')user_id
, t.column_value user_data
FROM dbuser.mytable m
, TABLE(XMLSEQUENCE(EXTRACT(m.xml_data, '/*/USER_LIST/USER'))) t
I get the following:
user_id, user_data
jsmith26, (XMLTYPE)
mjones45, (XMLTYPE)
sborga31, (XMLTYPE)
Note that the user_id is correctly extracted, however the XMLTYPE column (user_data) is empty in SQL Developer.
The same query returns the correct XML data in TOAD.
Edited by: 1008733 on May 29, 2013 5:07 PM

Steve,
So your example is slightly more complex than the one documented for a table in the standard OE schema here:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions052.htm
That example works fine on an 11.2.0.1 database with SQL Developer 3.2.20.09.87. Please try the following with your case:
Tools -> Preferences -> Database -> Advanced -> Display Struct Value In Grid (check it off if not already)If that still does not work for Run Statement (query result displayed in the grid, not as script output using Run Script), then please provide a test case based on the Warehouse table in the OE schema (or your case with DDL and DML scripts including the xml data) and I will log a bug.
Thanks,
Gary
SQL Developer Team

Similar Messages

  • Bug report SQL DEVELOPER DATA MODELER

    Hello,
    I think i found a bug using Sql developer data modeler 2.0.0 build 584.
    When importing a DDL file to create a relational model, foreign key constraints might not be created if foreign key uses multiple-field and the fields are not referenced in the same order as the primary key was.
    ex:
    Table FOO ..... PRIMARY KEY (id_1, id_2)
    FOREIGN KEY (id_2, id_1) REFERENCES FOO (id_2, id_1)
    Benjamin
    P.S: Bellow is a portion of SQL code demonstrating the problem:
    -- "_decompte"
    CREATE TABLE "_decompte"(
    numero_rang VARCHAR2(2),
    numero_contrat VARCHAR2(13),
    id_decompte VARCHAR2(19)
    ALTER TABLE "_decompte"
    add CONSTRAINT pk_decompte PRIMARY KEY (numero_rang, numero_contrat, id_decompte);
    -- "_decompte_detail"
    CREATE TABLE "_decompte_detail"(
    numero_rang VARCHAR2(2),
    id_ligne NUMBER(4),
    numero_contrat VARCHAR2(13),
    id_decompte VARCHAR2(19)
    -- "_decompte_detail"
    -- NOT Recognized by SQL DEVELOPER DATA MODELER (fields are not in the same order as primary key definition)
    ALTER TABLE "_decompte_detail"
    add CONSTRAINT fk_decompte_detail_1 FOREIGN KEY (numero_contrat, numero_rang , id_decompte) REFERENCES "_decompte"(numero_contrat, numero_rang , id_decompte);
    -- Recognized by SQL DEVELOPER DATA MODELER
    ALTER TABLE "_decompte_detail"
    add CONSTRAINT fk_decompte_detail_2 FOREIGN KEY (numero_rang, numero_contrat, id_decompte) REFERENCES "_decompte"(numero_rang, numero_contrat, id_decompte);

    Hi,
    Well, I was recently given some database scripts and asked to correct and improve them. These scripts were not generated but rather hand made. Having no access to a DBMS I was just curious about the result of this option in Data modeler and tried it for a better DB overview. I don't need it at all, but I was surprised to discover that the result was a failure. So I tried various scripts until I found the mistake.
    regards.

  • Bug report: sql developer/application express application import

    I noticed some bugs on deploying an application using sql developer 1.5.1-5440.
    Using a single file deployment generated by apex including install/upgrade/remove scripts: Here's what happens:
    # I tried installing version 1.1 of my application already existing. Connected to the parsing schema of the version 1.0 I can clearly see my app "dashboard(101)"
    # using sql dev I tried an application import. Using the following import options buildstatus =runonly, autoassign app_id and checked run install scripts
    # The install runs, but instead of using the upgrade script it simply runs the install script causing a lot of errors of course since the objects already exist in the schema
    # After this installation the application is visible in the workspace using a browser dashboard(102), however it remains invisible in sql developer where i can still only see dashboard(101)
    After this failure I decided to go ahead and try once more doing the same thing but now just not check run install scripts.
    To my amazement it still runs the install scripts???
    Now I have 3 application showing in the browser and still only 1 in sql developer
    Final problem with sql developer is that I choose to drop dashboard(101) it only deinstalls the application. It does not run the deinstall script for supporting objects included in dashboard(101).
    All this makes an easy deployment a real hassle, since the browser interface can't handle a run only apllication with supporting object as all (it simply doesn't run the install script) I need to use sql developer, which is then fine for the first install, but then doen't upgrade properly. Finaly deinstalling a run only application again is impossible from a workspace and does work from sql developer, but then you still have to do the deinstall of the db objects manually.
    I know as an apex admin I can work arround al this by switching the build status etc etc, but then again I can do anything if I'm apex admin and db sys.Point in having a single file deployment is allowing a novice user to easily install.
    Geert

    Hi Scott
    Thanks for the reply
    sspadafo wrote:
    Run Only applications don't show up in the application list because they should not be editable. But perhaps it could display an icon indicating that.In my opinion they should and they do. The single app that is appearing in the list in sql developer is run only. Having it here allows me to select drop amongst other functionality the browser interface currently still lacks. Even when I drop all apps and than reinstall them again it seems like I can only see 1 version of an app with the same name.
    sspadafo wrote:
    The problem you described where you can't use the Application Install wizard to install supporting objects if the application is set to Run Only should be fixed in the upcoming 3.1.2 release/patch.I've installed the patch and I'm afraid the patch is no good either. Indeed is has improved. After the app installs it shows the supporting object dialogue. But if you then select yes and press Next it does absolutely nothing and redirects tot the application showing Application not available for edit.
    So if you would be so kind to reopen bug 7286162
    So while I'm on this section in my opinion the following bugs exist/features are missing
    SQL Developer interface
    # Not all application for parsing schema are shown in connection explorer. It seems like it can multiple show apps with different names only not when you install the same app twice with different app_id's. Then it only show the lowest app_id.
    # Installing runonly app with supporting objects installs supporting object regardless of option selected
    # Installing runonly app with upgrade scripts ignores update scripts and runs install scripts regardless of "install supporting objects" checkbox's state
    # De installing app shows unpredictable behaviour for running deinstall scripts. It seemingly prompts random. Sometimes it does, sometimes it doesn't. When it does show I get behaviour like initially prompting for running deinstall script, failing to run deinstall script, causing neither app or objects to be dropped, on retry not showing prompt anymore and only dropping app.
    Browser interface
    # Installing a runonly app always finishes with a white page showing only Application not available for edit instead of showing a proper installation summary
    # Installing a runonly app still prevents installation of supporting objects
    # De installing a runonly application is not possible. Possible a button for de install could be included on page 4000:733
    # Unable to perform important application level task from workspace like changing status, alias, global notification, proxy \\      (which are all available in the sql developer interface and imho could all be added to page 400:733 of the browser interface)
    Hope this helps,
    Geert

  • PL/SQL Bug in SQL Developer?

    SQL Developer v 1.1.1.25 running on Windows XP.
    I have a PL/SQL procedure that does not compile with debug in SQL Developer. Compiling it with debug produces the following error:
    an Error(1): PLS-00801: internal error [79110].The only way I was able to get the procedure to compile in SQL Developer was to add the 4th line. If I uncomment the 4th line it compiles with debug. Why??
    Here is the procedure:
    CREATE OR REPLACE
    PROCEDURE BOGUS AS
      CURSOR c1 IS
        SELECT dummy FROM DUAL;
    --  x c1%ROWTYPE;
      PROCEDURE test ( rec IN OUT c1%ROWTYPE) IS
      begin
        null;
      end;
    BEGIN
      NULL;
    END BOGUS;Message was edited by:
    marife
    I played around some more with the procedure and discovered the problem. The key is the compiling with debug. I believe that compile with debug cannot build the debug information for a %ROWTYPE as a parameter. But if I define a local variable of that %ROWTYPE, then the compile with debug knows what debug information to track for the %ROWTYPE.
    I discovered that in SQL*Plus it compiles, but when you issue the ALTER PROCEDURE bogus COMPILE DEBUG, it does not compile. This is a problem with the debug option for compiling and not a problem with SQL Developer.
    Sorry for the posting. Hopefully this information will save other times and fustration.
    Mike

    Just for anyone else searching on this bug - I get the same error with certain procedures in TOAD when compiling with DEBUG.
    Fortunately nobody here has the first clue how to use TOAD debug so it's only ever switched on by accident or after a reinstall (it's the default) - so turning debug off fixes the problem.

  • Bug report: SQL Developer 3.2.09 Crashes for some Replace Regexp

    Hi,
    SQL Developer 3.2.09 (tested on Win XP with SQL Developer built-in Java) crashes for some Replace Regexp.
    Try the following:
    New SQL-sheet
    CTRL-R for Replace
    Enter "||" (two chars) as search-expression
    Enter "" (nothing) as replace-with-expression
    Check Regular Expressions Check Box
    Hit OK
    -->100% CPU usage, no reaction.
    Can you confirm the bug?
    Edited by: blama on Sep 4, 2012 3:48 PM

    I believe the pipe character is a regexp meta character and your regexp probaby matches everything repeatedly. If you want to replace the concatenation operator you don't need a regexp.
    Having said that, I am using SQL Developer on Linux with Java 1.6.0_33 and I don't get the hang, just replacing the same thing again and again.
    On windows with 1.6.0_24, I do get the hang. It may be a java issue.
    Edited by: Jim Smith on Sep 4, 2012 5:39 PM

  • BUG: SQL Developer 1.5.3 CSV export column order broken

    There's a bug in the 1.5.3 release of SQL Developer regarding data export. This bug re-orders the column order in the data export to be alphabetically sorted. This produces mangled CSV files if used on a table or a view.
    This is a critical bug to me since I need to produce lots of ad-hoc data CSV export files. I'm staying with SQL Developer 1.5.0.53 (53.38) for now as it doesn't have this problem.
    This is the same bug as present in Jdeveloper 11.1 as described in my post here: BUG: Jdev 11.1.1.0.0 -- DB table data export column order is not preserved
    Quoted from that post:
    When I connect to Oracle database, get the table list, right click on the table and select 'Export Data'->csv. The dialog box opens with three tabs: Format, Columns, Where. The column order displayed in both tabs Columns and Where is alphabetic. Because alphabetic ordering re-arranges columns from their initial ordering in the table, this screws up CSV export because columns are not in their intended order. This same problem occurs when I try to export data from views to generate a CSV file with a particular column order.
    Please open/check bug report if it's already open.
    Thanks!

    This happens with all of the export options for tables or views if you right click from the connections tab table list. If I pull it up in the main window and go to the data tab, I can then right click and it will keep the column id order for some of the views and tables. But not all.
    I am running 1.5.3 Build Main 5783 on a Windows XP Professional Service Pack 3 platform

  • Fallo en SQL Developer , bugs in SQL Developer

    He detectado que si hacemos clic con el botón derecho sobre una tabla y seleccionamos EXPORT ==> SQL INSERT. la exportación no se lleva a cabo.
    ¿Alguien ha detectado este problema?

    Mucho mas tarde, doy confirmacion del problema en mi sistema Linux SuSE 10.0 con Oracle 10g release 2 y la ultima version de SQL Developer (Build 14.67). No tengo ningun dato en el fichero ni en el "clipboard". Pero si no selecciono todas las columnas, el fichero o el clipboard se rellenan normalement. Eso explica que algunos dicen que funciona y otros que no funciona.
    Como solucion pratica, creo una vista (view) con una columno mas ( *, 1 as nada) y no la selecciono. Solo me queda cambiar el nombre de la tabula en el texto SQL que produce la exportacion.
    A few weeks later, I certify there is a bug (en my Linux SuSE 10.0 system con Oracle 10 g release 2 and Build 14.67 of SQL Developer). I obtain an empty file or nothing in the clipboard. If I don't select all fields, the file or clipboard are full of data. This explains why some assert there is no problem and other say there is one. As a practical solution, I created a view with an extra field ( *, 1 as dummy) and didn't select it. I only have to rename the table in the exported SQL text.

  • Bug in SQl Developer + Ubuntu 64 bits and Open JDK 7

    if i use de /usr/lib/jvm/java-1.6.0-openjdk
    a have this errors.
    SEVERE     283     1     oracle.dbtools.raptor.controls.grid.ResultSetTableCellRenderer     oracle.dbtools.raptor.controls.grid.ResultSetGridCell.computeDisplayValue(ResultSetGridCell.java:37)
    SEVERE     282     0     oracle.dbtools.raptor.controls.grid.ResultSetTableCellRenderer     oracle.dbtools.raptor.controls.grid.ResultSetGridCell.computeDisplayValue(ResultSetGridCell.java:37)
    SEVERE     281     1     oracle.dbtools.raptor.controls.grid.ResultSetTableCellRenderer     oracle.dbtools.raptor.controls.grid.ResultSetGridCell.computeDisplayValue(ResultSetGridCell.java:37)
    SEVERE     280     0     oracle.dbtools.raptor.controls.grid.ResultSetTableCellRenderer     oracle.dbtools.raptor.controls.grid.ResultSetGridCell.computeDisplayValue(ResultSetGridCell.java:37)
    SEVERE     279     1     oracle.dbtools.raptor.controls.grid.ResultSetTableCellRenderer     oracle.dbtools.raptor.controls.grid.ResultSetGridCell.computeDisplayValue(ResultSetGridCell.java:37)
    SEVERE     278     0     oracle.dbtools.raptor.controls.grid.ResultSetTableCellRenderer     oracle.dbtools.raptor.controls.grid.ResultSetGridCell.computeDisplayValue(ResultSetGridCell.java:37)
    SEVERE     277     1     oracle.dbtools.raptor.controls.grid.ResultSetTableCellRenderer     oracle.dbtools.raptor.controls.grid.ResultSetGridCell.computeDisplayValue(ResultSetGridCell.java:37)
    SEVERE     276     0     oracle.dbtools.raptor.controls.grid.ResultSetTableCellRenderer     oracle.dbtools.raptor.controls.grid.ResultSetGridCell.computeDisplayValue(ResultSetGridCell.java:37)
    SEVERE     275     1     oracle.dbtools.raptor.controls.grid.ResultSetTableCellRenderer     oracle.dbtools.raptor.controls.grid.ResultSetGridCell.computeDisplayValue(ResultSetGridCell.java:37)

    Welcome to the forum!
    Please read the FAQ for how to post a question and the information that you need to provide.
    The most important thing is that you actually need to post a question. Saying 'when I do this I have errors' is NOT a question. And it does not provide enough information for anyone to help you.
    The subject mentions Open JDK 7 but your content uses '/usr/lib/jvm/java-1.6.0-openjdk'. Nothing in what you posted says anything at all about whether you are using sql developer, what version you are using, or how you are trying to launch it.
    If you want help you have to provide detailed, specific information about each step you are taking and what results you get.
    Have you ever installed or used ANY version of sql developer on ANY platform?
    You are on a 64 bit system so are you using 64 bit versions of sql developer and the JDK?
    Are you aware that JDK 7 is NOT recommended for use with sql developer at this time?

  • Bug in SQL Developer 1.5 SQL Worksheet

    Hello,
    did any of you already encounter the following effect in version 1.5's SQL Worksheet?
    When I try to execute the following statement in version 1.5:
    select (1 +
    2 -
    3 +
    4)
    from dual;
    I get the error: ORA-00907 missing right parenthesis
    With more complex statements I also get an 'unimplemented feature' error.
    When I put the operators in front like this:
    select (1
    + 2
    - 3
    + 4)
    from dual;
    i get the correct answer '4' as result. Seems to be clearly a bug for me. In version 1.2 both versions work perfectly well.
    Does anyone know whether there's already some bug filed for this or whether there's a patch around?
    Regards Holger

    Hi Dieter W.
    It looks like the command does work in sqlplus , from what I can see only the first line (and continued first line) has continuation character facility. (I am working on an other related SQLDeveloper bug).
    i.e. No continuation character (10.2XE)
    SQL> select (1 +
    2 -
    3 +
    4)
    from dual;
    2 3 4 5
    (1+2-3+4)
         4
    Continuation character:
    SQL> select (1 -
    1 -
    1 -
    3)
    from dual
    2 3 select (1 1     1 3)*
    ERROR at line 1:
    ORA-00907: missing right parenthesis
    I am on the lookout for more information...
    -Turloch

  • Bug in SQL Developer Version 1.5.1

    I have a problem with the Database Export :
    The generated Insert-Command look's like:
    INSERT INTO atable (Field1, Field2) VALUES (10.'test');
    The Value-Separator is a point and not a comma.
    Is it a bug or have I chance to change the separator-parameter?

    Others have this problem as well... please check out this thread for more angles to attack this problem. Cheers.
    1.5 - Export to INSERT statements doesn't work
    -Tim

  • Meening of Geen Bug in SQL Developer 2.1.0.62

    I know this should be obvious to me, but is not and 2 other people I asked did not know either. What is the meaning of the green bugs that sometimes appear when you expand nodes (for example expanding the packages node)?
    I could not find the meaning in the documentation, but I have to say I did not know what to search for…
    Thanks

    Well, it's new and documentation isn't up to date yet, so don't worry if you don't know what it means.
    It actually indicates "compiled with debug info". For a minute you thought your code was infected, didn't you ;)
    Regards,
    K.

  • SQL Developer 3.1.07.42 existing column filter no longer editable

    LO developers,
    I have noticed a change in behaviour (I would not call it a regression ;o) ) since v3.1 prod release.
    Until 3.1.07.42, when you add a column filter on a table or query resultset, you could edit the filter later. Since 3.1.07.42, it is no longer possible: one has to remove the filter first and then enter a new one.
    Is this the intended behaviour? I preferred the previous one.
    Have a nice day,
    Olivier.

    Unfortunately. Here is another forum thread referencing this issue, including the bug number:
    Another bug introduced in production release - table filter
    -Gary

  • How to retrive relational data from an XMLType column in Oracle 10g R2

    Hi
    I want how to retrive the data which is in XML document in an XMLColumn in a Table(or an XMLTable which has the XML Document). This XML Document has to be Queried with XQuery as a Relational data(not an XML Document).
    If any body has some ideas please share it across ASAP.
    please share an example for this because i am new to this XQuery.
    Thanks in Expectation,
    Selva.

    Got it working now. I used the 'extract' function in my select statement, but had to add the .getStringValue() fuction. The extract function, just by itself, returns an XMLDocument type. The call for the column in the SQL statement looked like this.
    extract(XML_CONTENT, '/ROOTOBJECT').getStringVal() xml_content
    Thanks so much for your help. Problem solved!

  • SQL Developer 3.1 Bug: Tabs get closed!!!

    Hi!
    There is a bug in SQL Developer 3.1 which closes previously opened object editors when the number of opened editors increases over a certain amount.
    e.g.:
    Open PL/SQL package editors by clicking on them.
    After a certain amount of opened packages, the first openend packages begin to disapear.
    When theses packages were edited, you are asked if you want to save, ignore or cancel the operation.
    Best regards,
    Matthias Schulz

    Hi Matt,
    This is not a bug. The behavior is controlled through preferences:
    1. PL/SQL Editor: Tools|Preferences|Code Editor|Auto Pin (checkbox) + Max Open (input field) PL/SQL Editors.
    2. ObjectViewer: Tools|Preferences|Database|ObjectViewer|Automatically Freeze Object Viewer Windows (checkbox).
    3. Worksheet: Tools|Preferences|Database|Worksheet|Close all worksheets on disconnect (checkbox). Otherwise these inherently remain open.
    So we have a minor terminology issue with regard to "Pin" versus "Freeze". Also, another issue with tab width shrinkage as tab number increases:
    Please change the way window tabs are handled
    Regards,
    Gary
    SQL Developer Team

  • BUG: SQL Developer no longer identifies invalid views version 1.1.3.2766

    I have a sql script which 'CREATE OR REPLACE FORCE VIEW' a view but unlike SQLDeveloper 1.1R2 which I am amending in a third party editor and loading via sqlplus the view is created with "Warning: View created with compilation errors."
    In 1.1R2 this would have displayed a view icon with a red cross in the navigator bar. This is no longer the case. All views appear to be valid.
    Regards
    Kris

    It appears that SQL Developer is not handling the INTERVAL data type when a NULL value is present, e.g: -
    This works OK:
    SELECT CAST('-0 0:0:0.400000000' AS INTERVAL DAY(3) TO SECOND(0))
    FROM dual;
    This does not:
    SELECT CAST(NULL AS INTERVAL DAY(3) TO SECOND(0))
    FROM dual;
    As a work around you can simply TO_CHAR the column:
    SELECT source,
    destination,
    comments,
    flags,
    owner,
    job_name,
    job_creator,
    client_id,
    global_uid,
    program_owner,
    program_name,
    job_type,
    job_action,
    number_of_arguments,
    schedule_owner,
    schedule_name,
    start_date,
    repeat_interval,
    end_date,
    job_class,
    enabled,
    auto_drop,
    restartable,
    state,
    job_priority,
    run_count,
    max_runs,
    failure_count,
    max_failures,
    retry_count,
    last_start_date,
    TO_CHAR(last_run_duration),
    next_run_date,
    TO_CHAR(schedule_limit),
    TO_CHAR(max_run_duration),
    logging_level,
    stop_on_window_close,
    instance_stickiness,
    system,
    job_weight,
    nls_env
    FROM dba_scheduler_jobs a;
    Thanks
    Kelvin
    Edited by: Kelvin Hibberd on 05-Feb-2010 06:32

Maybe you are looking for

  • I'm getting the apparently "deadly" error 3149 when trying to restore my Ipod Touch 4g

    A few days ago I tried to update my Ipod Touch (4th Generation) to the newest software. I pressed update and the apple logo with a loading bar underneath it appeared then the bar got about halfway and all of the sudden went into recovery mode. I foll

  • Export in Flash MX works Flash 8 crashes

    I have Flash 8 professional and I admit I am very much a beginner at flash. I have taken a basic flash class so I know a few things. I got a template from template monster. I need to change some things about the template for my employer's needs. My t

  • E-Sourcing 7.0

    Hi, We are looking into a project to install E-Sourcing as "on-premise" solution and integrate with ECC 6.0 in backend. We have following questions:   1. E-Sourcing 5.1 is supported under mainstream maintenance until 2012. I understood from some othe

  • When I shake my iPhone 5 there is a loud thumping type sound.

    Any ideas ? Vibrate motor ? Battery? No Idea what's going on but it is very loud and you can feel the Shift in weight when moving / shaking phone. Thanks for any and all help :)

  • Bookmarks using custom Word Styles

    Hello: I have created a Word Document (Microsoft Office Word 2007) with styles that I would like to use as (nestled) Bookmarks in my PDF document.  I am using Adobe Acrobat 9 standard.  I have been successful with this template in earlier versions of