cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving data from db2

former_member69608
Participant
0 Kudos

Hi,

I want to retrieve data from our SAP db2 database. I got a user and access to the correct table. How can I do this?

I'm not familiar with the jdbc adapter. Do I always need to do a update after my select? Because all I want is to make a SELECT and then use that data in my mapping. I'm never going to make any updates to the table.

Also, is there any guide for how to type connection syntax and drivers? Must be something like jdbc:db2://server.com:5900/database etc.?

All help appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

>>> Do I always need to do a update after my select? Because all I want is to make a SELECT and then use that data in my mapping. I'm never going to make any updates to the table.

You can just have select statement. If you don't have anything to update just set mention <TEST> under update statement.

and yes connection string should be like ..

jdbc:db2://host:port/dbname



Answers (1)

Answers (1)

nabendu_sen
Active Contributor
0 Kudos

Hi Stefan,

We use UPDATE Statement after SELECT to raise some flag which indicates the Records already fetched. As mentioned by Hareesh, using <TEST> would technically resolve your problem under UPDATE section of JDBC Communication Channel.

But in this kind of scenarios, try to use Stored Procedures to avoid redundancy and inconsistency in your data.

For more details on Syntax and Driver: SAP Note  654800 - FAQ: JDBC driver certified for SAP on IBM

Regards,

Nabendu.