Forum Discussion

Cipriano's avatar
Cipriano
Helper III
3 years ago
Solved

Query based on tables without relations?

Hello everyone!

 

I have 3 tables that are not related, and I need to get a combined query, I tried to use UNION and SELECTCOLUMNS, but it was not possible.

 

first table

 

fechaid_productid_facilityconsumoprograma

01-ene-22AX105
02-ene-22AX2015
03-ene-22AY3010
04-ene-22BY4020
05-ene-22BZ5030

 

second table

fechaid_productid_facilityexistenciarecibido

01-ene-22AX10024
02-ene-22AX20056
03-ene-22AY30076
04-ene-22BY40045
05-ene-22BZ50056

 

third table

fechaid_facilityvolumen

01-ene-22X56
02-ene-22X43
03-ene-22Y45
04-ene-22Y65
05-ene-22Z21

 

expected result

 

fechaid_productid_facilityconsumoprogramaexistenciarecibidovolumen

01-ene-22AX1051002456
02-ene-22AX20152005643
03-ene-22AY30103007645
04-ene-22BY40204004565
05-ene-22BZ50305005621

 

any ideas, Thank you very much in advance.

 

PBIX-file: Query 

 

2 Replies