Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello
I use the following SQL statement but it only shows the Table4's values and all the rest values from the fields of the other tables are null.
SELECT * FROM Table1
LEFT JOIN Table2
ON Table1.Col1 = Table2.Col2
LEFT JOIN Table3
ON Table2.Col4 = Table3.Col5
RIGHT JOIN Table4
ON Table2.Col6 = Table4.Col7
Any idea?
Thanks!
Hi @UsePowerBI ,
Not sure if I understand your issue correctly.
Are you using this sql query in Power BI or you want to replicate similar query in Power BI?
Please add details: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Thanks,
Pragati
hi @Pragati11
I am putting this SQL statement in Power BI but it does not produce the result it should. The statement might be wrong, any hint?
Thanks
Hi @UsePowerBI ,
Try replacing the highlighted section as shown below with Table3.Col5:
Thanks,
Pragati
Hi @Pragati11
Thanks but Table4.Col7 can only be joined with Table2.Col6. The Table3.Col5 is not relevant to Table4.Col7.
Any other idea?
Hi @UsePowerBI ,
It is very difficult to analyze without looking at the data and just by imagining.
Is this statement correct in SQL?
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |