How to query 2 database in single Execute Activity?

Hi All,

I need to do Inner Join between Table 1 and Table 2. Table 1 is stored in DB2/GBQ and Table 2 is stored in SQL Server. I have the query ready but how do I use this query in UiPath to get the data.

Can I use 2 connection strings for different databases in Single Uipath activity?

Any Suggestion?

@skg_161125

Use two connect activities and configure the connection strings

Use two execute query activities which will give you output as Datatable

Now use Join Datatable activity and select Inner

Hope this may help you

Thanks

Hi @skg_161125

My suggestion is if you know SQL then create stored procedure to join those tables You can connect another DB in SQL query so that you can avoid multiple connection string in UiPath

Other datasource is either in DB2 or GBQ.

Hi

Being two different db there are only two options

-Either we can run on a single script either with a Function or procedure within which you can call and connect the second dB and perform the Join table and normalisation with which we can use one Single EXECUTE QUERY activity

-or we need to use two different EXECUTE QUERY activity and get the table
And then perform Join datatable in UiPath

Cheers @skg_161125

A view would be much simpler than a stored procedure.

Don’t need to do anything special as long as both databases are on the same server/instance. One connection, one query…