cancel
Showing results for 
Search instead for 
Did you mean: 

Select distinct command on a JDBC adapter

Former Member
0 Kudos

Hello,

We are planning to connect interfaces via JDBC. As we are not able to test that because of missing system we cannot answer this question currently which is important to define the process description for some interfaces.

Is it possible to use a select distinct command in a JDBC adapter with the SQL like message structure?

Does anybody have experience with that?

Our target tables are located on an oracle database.

Your help is really appreciated.

Best regards

Dirk

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>> Is it possible to use a select distinct command in a JDBC adapter with the SQL like message structure?

You can use all possible SQL commands. Further if your query is so complex, you can even go for Complex joins or stored procedures too.

>>>> Does anybody have experience with that?

Yes, in our project we use several interfaces using jdbc sender and receiver adapter to read and write data from and to oracle database respectively.

sender adapter link

http://help.sap.com/saphelp_srm40/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

receiver adapter link

http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

Please let us know if you need more help.

Former Member
0 Kudos

Hello Javaguy,

thanks for the answer.

I have some experience with JDBC adapters connecting to different DBs too (like Oracle, MS SQL, iSeries), but only with standard commands which are simple inserts, updates, selects and delete commands.

Never before I had to use different commands like e.g. "select distinct".

As there is no connectivity provided to customer systems currently and I am not in the situation to have any test

system available somewhere else with the required DB connect I could not do tests with "select distinct".

So my understanding is now that this command can be used. Great!

I will simply add the select distinct to the @action field in the target message for the statement.

I expect to have system connectivity within the next month. Then I will implement this, If I will have any issues

I will come back.

Thnak you very much!

Best regards

Dirk

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

Thank you for your answers!

Great to see that answers are what we hoped to read.

I will use this information and come back in a few weeks with results from testing!

Regards

Dirk

Former Member
0 Kudos

Hi,

Below Thread gives you info on execution of selection query..

when select query is able to execute by PI then it should handle distinct query too..

HTH

Rajesh

stefan_grube
Active Contributor
0 Kudos

You can use any valid SQL command in sender or receiver adapter.