on 03-25-2008 10:40 AM
Hello,
I want to use and XML file in the scenario FILE to JDBC where i use the operation as SELECT in which i want to embbed an sql statemnet which is equivalent to
SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO>1
as in the form of XML format like,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SELECT">
<TABLE>EMPTEST</TABLE>
<ACCESS>
<EMPNO></EMPNO>
<NAME></NAME>
</ACCESS>
<KEY>
<EMPNO compareOperation="GT">1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
Can i do like this?
PLease help me out in using various conditions in the XML file formats like the above.
Thanks,
Soorya.
Surya,
I believe the GT option is not available in the above mentioned structure. But you can do in the below structure.
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SQL_QUERY">
<ACCESS>SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO > '$EMPNO$</ACCESS>
<KEY>
<EMPNO>1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello raj,
I would like to write the query in that format where i mentioned as,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SELECT">
<TABLE>EMPTEST</TABLE>
<ACCESS>
<EMPNO></EMPNO>
<NAME></NAME>
</ACCESS>
<KEY>
<EMPNO compareOperation="GT">1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
without giving clear SQL statement as you mentioned here like,
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SQL_QUERY">
<ACCESS>SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO > '$EMPNO$</ACCESS>
<KEY>
<EMPNO>1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
Thanks,
Soorya
Raj,
i am getting this error when i am using that XML file,
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'EXAMPLE' (structure 'StatementName1'): java.sql.SQLException: FATAL ERROR in structure 'StatementName1': SQL queries are not supported in batch mode.
Soorya
raj,
now it trows this error,
JDBC message processing failed; reason ERROR occured parsing request:com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 92(:main:, row:5, col:72)(:main:, row=5, col=72) -> com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 92(:main:, row:5, col:72)
Sorya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
to use JDBC adapter see http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.