cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Polling the data at sender side using SQL Queries

Former Member
0 Kudos

Hello,

Small doubt regarding the concept of poling at sender side,

Can we select the data from one table in the queryStatement field and update the data in some other table in the updateStatement filed in the JDBC Sender Channel Configuration scenario.

And can we have the statements like this,

queryStatement: SELECT * FROM C_BIV_INVENTORY WHERE Exists (SELECT * FROM C_BH_FILTER WHERE INTERFACE = 'BW_BATCH' AND STATUS = 'PENDING')

updateStatement: UPDATE C_BH_FILTER SET STATUS = 'COMPLETE' WHERE INTERFACE = 'BW_BATCH'

Can you please help me out in testing this queries on Oracla database.

Thanks

Soorya.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Soorya !

As far as I know, there should be no problem with your queries. SELECT and UPDATE queries could be independent and allows you to give the meaning you need to just SELECT data and then trigger an UPDATE that is supposed to "flag" the previously selected data to avoid the next SELECT to catch the same records again.

one interesting link :

/people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter

Regards,

Matias

ps: please award points if helpful.

Former Member
0 Kudos

Hello,

Then please tell me what do u mean by this,

SQLException during query

'SELECT * FROM C_BIV_INVENTORY_HISTORY_WMT WHERE Exists (SELECT * FROM C_BH_FILTER WHERE INTERFACE = 'BW_INVENTORYBALANCES' AND STATUS = 'PENDING')'

:java.sql.SQLException: Io exception: A remote host did not respond within the timeout period.#

Thanks ,

Soorya.

Former Member
0 Kudos

Hi Surya !

You SELECT query

'SELECT * FROM C_BIV_INVENTORY_HISTORY_WMT WHERE Exists (SELECT * FROM C_BH_FILTER WHERE INTERFACE = 'BW_INVENTORYBALANCES' AND STATUS = 'PENDING')'

seems to have two unrelated queries... how C_BIV_INVENTORY_HISTORY_WMT table is related to C_BH_FILTER ?? by which fields? maybe it is returning a lot of rows and this is the cause of the timeout.

regards,

Matias.