Hi @ADX ,
Thank you for posting query in Microsoft Q&A Platform.
You can consider taking result sets of
tableAandtableBin to temporary result sets usingletkeyword and then finally performunionon these results.
Please check below sample implementation. Here tableA and 'tableB` are temporary in memory tables.
Hope this helps. Please let us know if any further queries.
-----------------
Please consider hitting Accept Answer button. Accepted answers help community as well.
and upvote
for the same. And, if you have any further query do let us know.