Can't use SELECT/CONNECT BY with GETXML

Hi!
If I use CONNECT BY option in the select I get the following error.
<error_result>oracle.jdbc.driver.OracleSQLException: ORA-00900: invalid SQL statement
Are there limitations?? Can I user PL/SQL procedure codes to achive this and generate XML?
Please HELP
Roger

Hi Steve!
PLEASE HELP.. This post is regarding getXML and generating XML from PL/SQL stored procedure. I looked at your reply on another post and example of looping cursor but how do you generate XML out of the following code you demonstrated previously.
DECLARE
-- Nested, parameterized cursor
CURSOR empCur( d NUMBER) IS
SELECT ENAME, EMPNO
FROM EMP
WHERE DEPTNO = d;
BEGIN
FOR d_rec IN (SELECT DEPTNO, DNAME FROM DEPT) LOOP
dbms_output.put_line('DEPTNO='| |d_rec.deptno);
dbms_output.put_line('DNAME='| |d_rec.dname);
FOR e_rec IN empCur(d_rec.deptno) LOOP
dbms_output.put_line('EMPNO='| |e_rec.empno);
dbms_output.put_line('ENAME='| |e_rec.ename);
END LOOP;
END LOOP;
END;
Many thanks
Roger

Similar Messages

  • How can I use the Connection Pool with DB2

    Hi All,
    I am facing the problem with the usage for the Connection Pool.
    I want to use DB2 via JNDI lookup.
    But when starting the Weblogic server, Error occured with the following message.
    <Error> <JDBC> <Cannot startup connection pool "MyJDBCPool" Cannot load driver class : com.ibm.db2.jdbc.app.DB2Driver>
    DB2 and Weblogic are on the same machine.
    In case of the use of remote DB2 database, I also encountered the same error.
    Configurations are as follows.
    <JDBCConnectionPool DriverName="com.ibm.db2.jdbc.app.DB2Driver"
    MaxCapacity="10" Name="MyJDBCPool"
    Password="{3DES}gCGsOfD9M6iwOtgL2v/NpA==" Targets="myserver"
    TestConnectionsOnReserve="false" TestTableName="test" URL="jdbc:db2://localhost:6789/yongjoo"/>
    <SNMPAgent Name="mydomain"/>
    <JDBCDataSource JNDIName="acsdb" Name="acsdb" PoolName="MyJDBCPool" Targets="myserver"/>
    Could you please give some information about this problem? I will appreciate your kindness.

    Hi Joe,
    Thanks your help.
    Perhaps It's my fault for Weblogic console's setting.
    After I reset the target server in console, Error message disappeared.
    But, when I call the TestCode, I encountered another error message. The error
    is NameNotFoundException.
    When lookingup the JNDI name, NameNotFoundException errer occured. I tried to
    change my setting and JNDI name, but the results are the same.
    Would you please give me some information about this one more time? I will be
    appreciated for your help.
    Follows are Config.xml
    <JDBCConnectionPool DriverName="com.ibm.db2.jdbc.app.DB2Driver" MaxCapacity="10"
    Name="MyJDBCPool" Password="{3DES}gCGsOfD9M6iwOtgL2v/NpA==" Targets="myserver"
    TestConnectionsOnReserve="false" TestTableName="test"
    URL="jdbc:db2://localhost:6789/yongjoo"/> <SNMPAgent Name="mydomain"/>
    <JDBCDataSource JNDIName="acsdb" Name="acsdb" PoolName="MyJDBCPool"
    Targets="myserver"/>
    and follows are TestCode,
    url = "t3://localhost:7001"; //default URL
    datasource = "jdbc/acsdb";
    Context ctx = null;
    Hashtable p = new Hashtable();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, url);
    try{
    ctx = new InitialContext(p);
    System.err.println("initialContext(p)"+ctx); <-- success
    ds = (DataSource)ctx.lookup("java:comp/env/jdbc/acsdb");
    }catch(NameNotFoundException ne){
    throw new ConnectionException(); .
    }catch(NamingException ne){
    throw new ConnectionException();

  • After entering the Wlan password I can't use the „connect" button. The button is deactivated. Did somebody have a solution? I have an iPad 3 with IOS 8.0.2.

    After entering the Wlan password I can’t use the „connect“ button. The button is
    deactivated. Did somebody have a solution? I have an iPad 3 with IOS 8.0.2.

    Your iPhone's iOS must be same or newer than the one in backups. In your case it is older so you need to update your iPhone and then recover it with backup.

  • Can I use Apple Magic Mouse with my IPAD2, have tried to connect them with Bluetooth without success

    Can I use Apple Magic Mouse with my IPAD2, have tried to connect them with Bluetooth without success
    Dag Ove

    I suggest that you request this feature, as I have, at Apple's feature request site. Maybe if enough of us request this it will come in a future iOS release.
    http://www.apple.com/feedback/ipad.html

  • Can we use dbms_output.put_line package with forall statement

    Hello Everybody
    Can we use dbms_output.put_line package with forall or can we use insert,update and delete only
    declare
    type emp_rec is table of emp%rowtype
    index by binary_integer;
    t emp_rec;
    begin
    select * bulk collect into t from emp;
    forall i in t.first..t.last
    dbms_output.put_line(t(i).name);
    end;Thanks & Regards
    peeyush
    Edited by: Peeyush on Nov 25, 2010 11:45 PM

    MichaelS wrote:
    Well as the docs explain (though not very clear and detailed, I admit) you can use a dynamic sql statement (execute immediate) with FORALL.You got me interested in the performance side doing this Michael - running PL/SQL code via a FORALL loop.
    It is faster than using a normal FOR loop to execute dynamic PL/SQL - a bit surprising as I expected another context switch to be in there. But seems like the PL/SQL engine is a more clever at optimisation than what I originally credited it with.. ;-)
    Of course - pre-compiled/static PL/SQL code in a FOR loop is the fastest, as expected.
    SQL> declare
      2          type TNumbers is table of number;
      3 
      4          type TTimes is record(
      5                  for_all number,
      6                  for_dynamic number,
      7                  for_static number
      8          );
      9 
    10          type TTimesTable is table of TTimes;
    11 
    12          MAX_ITERATIONS  constant number := 10;
    13 
    14          plBlock         varchar2(1000) :=
    15          'declare i number;
    16          begin i:= :var / 10; end;';
    17 
    18          performance     TTimesTable;
    19          t1              number;
    20          bindVar         TNumbers;
    21          n               number;
    22  begin
    23          select
    24                  level bulk collect into bindVar
    25          from    dual
    26          connect by level <= 10000;
    27 
    28          dbms_output.put_line( 'Iterations: '||bindVar.Count||' for loop cycle(s)' );
    29 
    30          performance := new TTimesTable();
    31          performance.Extend( MAX_ITERATIONS );
    32 
    33          for j in 1..MAX_ITERATIONS
    34          loop
    35                  t1 := dbms_utility.get_time;
    36                  forall i in 1..bindVar.Count
    37                          execute immediate plBlock using bindVar(i);
    38                  performance(j).for_all := dbms_utility.get_time-t1;
    39 
    40                  t1 := dbms_utility.get_time;
    41                  for i in 1..bindVar.Count
    42                  loop
    43                          execute immediate plBlock using bindVar(i);
    44                  end loop;
    45                  performance(j).for_dynamic := dbms_utility.get_time-t1;
    46 
    47                  t1 := dbms_utility.get_time;
    48                  for i in 1..bindVar.Count
    49                  loop
    50                          n := bindVar(i) / 10;
    51                  end loop;
    52                  performance(j).for_static := dbms_utility.get_time-t1;
    53          end loop;
    54 
    55          dbms_output.put_line( 'Times in 100th of a second' );
    56          dbms_output.put_line( rpad('for all',15) || rpad('for dynamic',15) || rpad('for static',15) );
    57          for i in 1..performance.Count
    58          loop
    59                  dbms_output.put_line(
    60                          rpad( performance(i).for_all, 15 )||' '||
    61                          rpad( performance(i).for_dynamic, 15 )||' '||
    62                          rpad( performance(i).for_static, 15)
    63                  );
    64          end loop;
    65 
    66  end;
    67  /
    Iterations: 10000 for loop cycle(s)
    Times in 100th of a second
    for all        for dynamic    for static
    10              72              0
    6               37              0
    6               37              0
    6               37              0
    6               36              0
    6               37              1
    5               37              0
    5               37              0
    6               37              1
    5               37              0
    PL/SQL procedure successfully completed.
    SQL>

  • Can I use HP Pro 8600 with usb and wireless at the same time

    Can I use HP Pro 8600 with usb and wireless at the same time?  Sometimes I cannot get the wireless to work, it seems to be my laptop.  It would be nice if I could use the usb, but it doesn't work.  What should / can I do, if anything?
    Sam

    Hi,
    Same physical printer but when connecting to SAME computer using both USB and wireless it becomes two (logical) printers. Probably your default prnter is the wireless one, you have to select the right printer before print .
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How can i use my apple ID with the itune store over my windows laptop

    how can i use my apple ID with the itune store over my windows laptop

    If you don't have iTunes installed on your laptop then you can download and install it from here : http://www.apple.com/itunes/download/
    You can then log into your account on it via the Store > Sign In menu option (on iTunes 11 on a PC you can get the menus to show via control-B) :
    And you can then select the Store on the left-hand sidebar (you can enable the sidebar via control-S), and then browse items in the store and buy them by clickin on their price.

  • New to Apple products (finally) - can I use my Itunes account with multiple products e.g. Iphone and Ipad?

    New to Apple products (finally) - can I use my Itunes account with multiple products e.g. Iphone and Ipad?

    Oh yes! Apple will be happy for you to buy as many Apple products as you can afford.
    As and when needed, each can be given its own selections of content to sync with.
    tt2

  • I can't use my Philips monitor with Mac mini

    I can't use my Philips monitor with Mac mini, I am using a HDMI to VGA cable to connect them. But no signal on my Philips monitor.
    My Mac mini is in a good condition, it can connect with my HDTV, the BENQ monitor at my office, but I can't make it connect with my Philips monitor.
    I dun know what happen.
    Please help!
    Thanks!

    The two are incompatible, HDMI is a digital signal and VGA is an analog signal. You need a monitor with a HDMI port or a DVI-I port, these are both digital signals. DVI-I gives the best output.

  • Can I use the pdf fax with a DSL line

    Can I use the pdf fax with a DSL line and, if so, how do I get the pdf fax modem to appear in my printer options? No Modems appear in my Modem pop-up menu.
    Thanks,

    Should I be able to fax using the internal fax software if I set it up with the proper settings?
    Yes, if it's not a purely Digital line, dial that FAX number on your Phone, does it answer with a screech?
    Must I disconnect all my other lines in order to use this?
    No, you shouldn't need to... do you have DSL Filters on all lines except the DSL connection, like these...
    http://www.twacomm.com/info/DSL_Filters.htm
    Oh, it's not clear, do you have 2 actual Lines/Phone numbers, or do they share the same line?

  • Solution manager can be used as repository DB with out-of-box integration?

    Solution manager can be used as repository DB with out-of-box integration?
    Hi ,
    In Our Global SAP Environment, We are looking to use solution manager as a CMDB ( Config management DB) , which is kind of repository DB where it needs to keep track of infrastructure components .    
    A CMDB about Host consists of elements like
    No. of CPUs,
    RAM  size,
    ...etc
    For example in solman SMSY , you get some  information about the SAP Host . 
    we have multiple CMDB systems , each one for our supplier .
    For example Host hardware () CMDB is managed by Vendor1,
    Storage CMDB by  vendor 2  , and we need to join the both information , in order to get the Full elements of the Host .
    A host information spread across the Multiple Vendor CMDBs.
    Now we want to use solman as single CMDB, where Solman keeps track of some data , and needs to get some additional data  from vendor1 by connecting  into
    their DB using  the  username/password ..etc
    Does the solman has this Out-of-box functionality?
    Thanks
    Vasu .

    Hi - smilar question
    If we setup the system monitoring using solution manager , can we able see the TCodes & their screens from solman .
    For example Can I able to control my ECC screens (SCC4, RZ10,SMLG,SALE,SPAD,SM59,.... ) from Solution manager ?
    waiting for the reply .
    Thanks
    Vasu

  • Can Flex 4.6 connect directly with a MS WCF

    Can Flex 4.6 connect directly with a MS WCF without having to use a 3rd party tool like WebOrb.  I have several basic httpprotocal wcf services that I want to move to a mobile app with Flex. Any feed back or insight will be appriceated.

    The correct answer to this question appears to be that Apple's terms of service *do not* prohibit the loading of swf's on IOS from remote servers dynamically at runtime.  They prohibit the loading of swf's that *contain executable ActionScript code*. 
    I loaded a PPT into Adobe Connect and then retrieved the resultant slide swf's from the Connect server.  I took these swf's and loaded them into my iPad app, dynamically at runtime, from a remote server.  The swf's loaded and animations played.  I made no changes to my code.  I'm just using a plain old SWFLoader object.
    Loading swf's dynamically at runtime from remote servers into IOS works - if you make the swf's right.  How to do that I'm not sure.

  • Can I use LEAD or LAG with Groups?

    Can I use LEAD or LAG with Groups?
    I want to compare two records of each group.
    Is it possible?
    Thanks in advance

    Xavi wrote:
    I have this query:
    SELECT a.cod_riesgo_txpk           as num_poliza,
    a.cod_suplementor_txpk      as suplemento,
    a.movimiento_nmpk           as movimiento,
    a.cod_tipo_operacion_txfk   as tipo_operacion,
    rc.fecha_vcto_cobertura_txd as fecha_vto,
    rc.capital_asegurado_nm     as capital,
    rc.prima_total_nm           as prima
    FROM REGU_RIESGOS_COBERTURAS rc, REGU_MOVIMIENTOS_POLIZAS a
    WHERE rc.cod_cobertura_txpkfk ='005'
    AND rc.cod_riesgo_txpkfk = a.cod_riesgo_txpk
    AND rc.cod_suplementor_txpkfk = a.cod_suplementor_txpk
    AND rc.movimiento_nmpkfk = a.movimiento_nmpk
    order by num_poliza, movimiento;
    The results:
    NUM_POLIZA     SUPLEMENTO     MOVIMIENTO     TIPO_OPERACION     FECHA_VTO     CAPITAL     PRIMA
    0640080109141     0640080109141/014     1     02     01/05/2010     15025302,61     3,19
    0640180096274     0640180096274/006     1     02     01/05/2006     1652783     1387,8
    0640180365194     0640180365194/005     1     02     08/07/2006     150253     294,83
    0640180369821     0640180369821/009     1     02     31/12/2006     13460000     28483,08
    0640180369821     0640180369821/010     2     02     28/02/2007     13460000     29546,08
    0640180384185     0640180384185/010     1     02     30/12/2006     36085241,96     113951,53Can yo see NUM_POLIZA 0640180369821     I have two records, then I want to compare two rows in each grou.What do you mean by compare? What do you want to do?
    You can use the PARTITION BY clause if you want the analytic function to work within a specific group.

  • Can I use airport time capsule with a hotspot network?

    Can I use airport time capsule with a hotspot network?

    Can I use airport time capsule with a hotspot network?
    Very very poorly..
    It can join a wireless network..
    See instructions here.
    https://discussions.apple.com/thread/5719954?tstart=0
    End result is super slow wireless connection to the TC and all packets pass through the hotspot so expect internet to drop to nothing while you are backing up.

  • Can i use my ipod touch with airport express?

    I will be staying in a hotel that only offers hard wire internet connection.  Can I use my ipod touch with airport express to have have WiFi?  I won't have my computer with me.
    Thanks!

    Yes, you can. However, you will not be able to administer the AirPort from the iPod Touch. Thus you would need to pre-configure the AirPort Express to work at the particular hotel that you will be staying at. Note: Most hotels now offer Wi-Fi in the rooms and the Express may not be necessary.

Maybe you are looking for

  • UPS features, can these be managed?

    I probably should ask this on another forum but I figure someone here can help me and I trust you all with my Mac! And of course it is the weekend so I can't call APC and I'd like to figure this out before Monday if posibble. The APC UPS item BR1200

  • Low call volume after IOS 8 update on iPhone 5s

    After updating my iPhone 5s to IOS 8 , the volume of incoming calls has dropped quite dramatically,others, here me fine. I have tried turning "off " and doing a "reset" with no luck. Volume is turned all the way up. Anyone else, have this problem or

  • How can I insert data from a cfloop?

    I have a query that outputs into a cfloop. What I need it to do is insert into an access database when the changes have been made. I have looked at several tutorials but they all offer different solutions than what I am looking for. My cflloop is: <c

  • Web Dynpro Java - Light Portal Desktop

    Hi Guys... I have a web dynpro java application that I want to display on a Light Portal Desktop, but when I display the iview... it gets cut. I mean I can see only part of my application and there is also a right scroll bar... It looks like the heig

  • Email excel truncating the output - why?

    Using the foloowing code to send a report output as and excel attachment in e-mail. But the final Excel Spread Sheet at SCOT / SOST does not show all the rows.       CALL METHOD DOCUMENT->ADD_ATTACHMENT         EXPORTING           I_ATTACHMENT_TYPE