Skip to Content
avatar image
Former Member

JDBC Query

Hi All,

Could you please tell me if we can have multiple select, insert, delete etc quesry's in one database fetch using JDBC adapter.

Is multiple UPDATE commands possible.

Also why is update command used??

Regards,

Ashish

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 24, 2007 at 05:55 AM

    >>Could you please tell me if we can have multiple select, insert, delete etc quesry's in one database fetch using JDBC adapter.

    No. This is not possible directly 😔

    But you can make use of stored procedure that reurns resultsets.

    >>Also why is update command used??

    Update command is used to prevent reprocessing of the same msg.

    Regards,

    Jai Shankar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 24, 2007 at 05:58 AM

    Hi,

    you acheive this by using stored procedures,Please refer this below links gives you better idea.

    http://help.sap.com/saphelp_nw2004s/helpdata/en/45/023c41325fa831e10000000a1550b0/frameset.htm

    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/5a805f85833e17e10000000a114cbd/frameset.htm

    Thanks and Regards,

    Sekhar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 24, 2007 at 06:08 AM

    Hi,

    ~~~<i>Could you please tell me if we can have multiple select, insert, delete etc quesry's in one database fetch using JDBC adapter.</i>

    Within one database message you can add <b>multiple statements</b> to perform select, insert, delete etc.

    Refer this link http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

    ~~~<i>Is multiple UPDATE commands possible.</i>

    In sender JDBC communication channel, One update command can be entered. It can be Insert, Select or Delete

    ~~~<i>why is update command used??</i>

    To make sure each record in database will be selected only once for XI scenario execution.

    Regards,

    Uma

    Message was edited by:

    Uma Maheswari

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 24, 2007 at 05:58 AM

    Ashsih,

    Sure we can do everything in one shot.

    For the receievr JDBC adapter , the datatype that you create matters a lot.

    If you look into thishttp://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm">this> link and see the datatype, you have multiple STATEMENT tags and each of these perfroms a separate function like Insert, Update , Delete etc. So, you can do all these function using a JDBC receiver adapter in one shot or in multiple calls as per requirement.

    Multiple UPDATE is also possible. Update command as the name implies is used to Update the database with some values for rows satisfying some condition.

    Please look into these blogs on Receiver JDBC adapter,

    <a href="/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30">FILE to JDBC Adapter using SAP XI 3.0</a>

    <a href="/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step">JDBC Receiver Adapter -- Synchronous Select – Step by Step</a>

    Regards

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded