Forum Discussion
Niels_NL
10 years agoAdvocate I
Merge two tables into one
Hey guys, so I've got two tables now: Customers CustomerID CustomerName Locationdata Businessdata Marketingpreferences CustomerID CustomerName Marketingpreference1 Marketingpreferenc...
ankitpatira
10 years agoCommunity Champion
Niels_NL in that case you select marketing table then click merge queries and merge it with customers table using customer id and left join.
Niels_NL
10 years agoAdvocate I
ankitpatira I tried that, but that still gives me the same results --> 3000 customers of whom marketing preferences are known; other 3000 with unknown marketing-data aren't inserted as extra rows.
I'm getting a new column named 'NewColumn' though, see image below:
- ankitpatira10 years agoCommunity ChampionNiels_NL for the rest 3000 it will give null rows right ? In NewColumn click on Table and you will be able to choose which columns to be merged.
- Niels_NL10 years agoAdvocate I
ankitpatira No, the 3000 other customers without marketing-data just isn't inserted.
I'm still having a total amount of 3000 records in the table, instead of 6000 where 3000 would have 'null'-values.
- Eric_Zhang10 years agoMicrosoft Employee
Merge query with "Left Outer" join does work, do note the join order. I doubt it is Market Left Outer Join Custmer in your case.
I've attached the test pbix for your reference. If you have any question, feel free to let me know.