Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending list of records to Named Query

 
Mohammed Yousuff
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using named query, to update a list of trasactions.

<sql-query name="updateErrors">
UPDATE TEST_ClEARING_TXNS SET TXN_CLEARING_STATUS=:TXN_CLEARING_STATUS,MODIFIED_BY=:MODIFIED_BY,MODIFIED_DT=:MODIFIED_DT WHERE TRANSACTIONEVENT_ID =:ALL_TRANSACTIONEVENT_ID
</sql-query>

i want to send a list of txn ids to ALL_TRANSACTIONEVENT_ID column, may i know how can i send a list of records to named query???

thanks a lot
 
Javid Jamae
Author
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Off the top of my head, I think your where clause needs to be:

WHERE TRANSACTIONEVENT_ID in :ALL_TRANSACTIONEVENT_ID

then you need to use the setParameterList method. For example:

session.getNamedQuery("updateErrors").setParameterList( ... )

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic