Skip to Content
avatar image
Former Member

Can we use Joins to select columns from mutiple database tables with case statement

Hi All,

I am working on proxy to jdbc syn scenarion...

I need to select data from different columns from multiple table and have to write case statement also in qurery to check if data is there or not. Is this is the correct way select data from database table through PI.

Can we go for store procedure ask my database to give me procedure.

Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 26, 2012 at 12:40 AM

    You have two options

    1) Go for stored procedure

    or

    2) Write SQL Join tables and check for not null values for the columnsĀ  and follow the jdbc structure specified as statement6 given in the sap help link.

    http://help.sap.com/SAPHELP_NW04s/helpdata/EN/2e/96fd3f2d14e869e10000000a155106/content.htm

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Ritu,

      May be you can achieve your requirement by using Joins but i dont prefer writing comples statements in JDBC adapter, better to request you DM team to create a one more table and that table should have data from all tables.

      DB has to write a stored procedure to pull data from 3 tables , they can easily do it.

      then poll JDBC sender adapter to new table.

      Eg:it is possible to check null in field using Select query in PI.

      SELECT DELIVERY_NO,SHIP_METHOD_CODE,TRACKING_NO,TOT_CHARGE,SHIPMENT_WEIGHT,SHIP_DATE,HANDLING_UNIT from SHIPMENTS_IN where TRIM(SAP_Update_flag) IS NULL

      Regards,

      Raj