cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WorkingForFood
Advocate V
Advocate V

Datatable Joins

I have two DataTable variables in PAD and need to join them. Is there a way to do this in PAD without using a SQL database?

5 REPLIES 5
ZS440
Resolver III
Resolver III

@WorkingForFood 

The number of columns needs to be the same.

try it sample.

 

SET NewVar TO {[1, 2, 4], [6, 7, 8] }
SET NewVar2 TO {[8, 2, 4], [6, 7, 8], [5, 6, 7] }
LOOP LoopIndex FROM 0 TO NewVar2.RowsCount - 1 STEP 1
SET NewVar TO NewVar + NewVar2[LoopIndex]
END

スクリーンショット 2021-06-02 010133.jpg

Thanks for the reply @ZS440 , but it looks like your solution produces a UNION, but I'm looking for a JOIN (specifically LEFT JOIN).

Hi @ZS440 , I know that this is an old post but your solution would be exactly what I need.

But I failed to apply it.

When I apply the last Set variable action, it is like this:

cfoenki_0-1648226943316.png

On your screen you don't have the ' among the +.

How did you get that?

 

Thank you in advance.

ZS440
Resolver III
Resolver III

@cfoenki 

%NewVar% + %NewVar2[LoopIndex]%

Note the "%" and try writing

%NewVar + NewVar2[LoopIndex]%

cfoenki
Helper I
Helper I

You're my hero! 🙂

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Kudoed Authors
Users online (3,941)