Is it possible to join a table in the database with UiPath's datatable?

My objective is to automate data extraction from db2 which is on ibm-i(AS400).
Need to execute bunch of SQL and they are dependant on each.

Current manual operation is performed like this.

  1. Execute SQL form STRSQL and output initial result by F13-service
  2. Joining the previous result with another table and output a file
  3. Joining the previous result and so on…

At first I tried to use Ui Automation by UiPath.Terminal.Activities but I couldn’t solve timeout issue for waiting SQL execution result.
Then I changed the approach to use UiPath.Database.Activities but it seems there are no way to joining the datatable result with a table in the connected database.

It can be possible if I make a step uploading extracted result after each sql execution but I want to make sure if there’s no other way.
Is there anyone has an idea?

Hello @Kotat ,

I hope you are extracting datat from 2 tables and want to join that and then need to insert it to some datatable? Is that udnerstanding correct?

Thank you !
I want to extract data like described below. I’m wondering if there is easy solution to store the SQL result on IBM i.
I only know the way to get the result as datatable object on UiPath, not on IBM i.

  1. issue an SQL and save the result in the IBM i machine itself.
    “select * from table1”
    → save it as MYLIB/MYTEMP on IBM i
  2. issue the next SQL with the previous result
    “select A., B. from MYLIB.MYTEMP a
    inner join table2 b
    on a.key1 = b.key1”
    → save it as MYLIB/MYTEMP2 on IBM i
  3. repeat the same kind of execution …

I only needed to research more about SQL basics … :sweat_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.