cancel
Showing results for 
Search instead for 
Did you mean: 

Sub selects in UPDATE_INSERT - JDBC Receiver - Oracle DB

Former Member
0 Kudos

Hi.

Short question...

Anybody know if subselects are permitted in the JDBC Receiver adapters UPDATE_INSERT statement.

I tried with and without the hasQuot attribe without luck.

Error message is: ORA-00936 - missing expression.

Example:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:some_MT xmlns:ns0="http://test">

<stmt>

<Data action="UPDATE_INSERT">

<table>DATA</table>

<access>

<DATA>13</DATA>

<UTC_TIME hasQuot="No">to_date('2008-10-02 04:00:00', 'YYYY-MM-DD HH24:MI:SS')</UTC_TIME>

<DATA_ID hasQuot="No">select data_id from data_id_table where id = 34</DATA_ID>

</access>

</Data>

</stmt>

</ns0:some_MT>

Regards...

Peter

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi again.

Solved the problem...

To execute a subselect in oracle, you need to embed the statement in parentheses.

This worked for me!

<?xml version="1.0" encoding="UTF-8"?>

<ns0:some_MT xmlns:ns0="http://test">

<stmt>

<Data action="UPDATE_INSERT">

<table>DATA</table>

<access>

<DATA>13</DATA>

<UTC_TIME hasQuot="No">to_date('2008-10-02 04:00:00', 'YYYY-MM-DD HH24:MI:SS')</UTC_TIME>

<DATA_ID>(select data_id from data_id_table where id = 34)</DATA_ID>

</access>

</Data>

</stmt>

</ns0:some_MT>

.