Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
tksnota
Post Patron
Post Patron

Error When Using Left Join on 2 Different Tables

Hi,

 

I'm trying to join 2 tables namely gbkmut (data=Creditor) with GRV_Creditors (data=Creditors) but I'm getting the errors below.

 

Any idea what I'm doing wrong because I had done several Left Joins and all of them worked but this one isn't???

 

Thanks...tksnota...

 

tksnota_3-1735917070562.png

 

 

 

tksnota_1-1735916824993.png

 

tksnota_2-1735916863881.png

 

1 ACCEPTED SOLUTION
Thejeswar
Super User
Super User

Hi @tksnota ,

The Error you are showing happens while getting connected to SQL Server. But the Creditor and Creditors column that you are displaying in your sceenshots are from Power BI which may have been replaced after importiing the data.

 

To have this problem resolved, you should check if this query runs in the SSMS as told by @lbendlin . If SSMS cannot be used, try to verify using some other way like some document to know what exactly is the column name in the tables that you are trying to join. If the columns are there, try to see if there are any unwanted spaces before or after the column names in the databases. This also would result in an invalid object.

 

As the error clearly says, this issue is because of it not able to find the right columns. 

 

Regards,

View solution in original post

7 REPLIES 7
Thejeswar
Super User
Super User

Hi @tksnota ,

The Error you are showing happens while getting connected to SQL Server. But the Creditor and Creditors column that you are displaying in your sceenshots are from Power BI which may have been replaced after importiing the data.

 

To have this problem resolved, you should check if this query runs in the SSMS as told by @lbendlin . If SSMS cannot be used, try to verify using some other way like some document to know what exactly is the column name in the tables that you are trying to join. If the columns are there, try to see if there are any unwanted spaces before or after the column names in the databases. This also would result in an invalid object.

 

As the error clearly says, this issue is because of it not able to find the right columns. 

 

Regards,

v-pagayam-msft
Community Support
Community Support

Hi @tksnota ,

Thank you for reaching out to the Microsoft Fabric Community Forum regarding the issue you're experiencing.

Based on the information provided, to use the left outer join between the two tables, ensure that the columns you are joining on in both tables have compatible data types and their names match exactly. It appears that the data types are same, but there is a discrepancy in the column names. Kindly change the column names in both tables and try the join operation again.This might help you to resolve the error.

If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

tksnota
Post Patron
Post Patron

The error now is invalid syntax but still can't get these 2 tables to be connected

 

tksnota_0-1735947668684.png

 

tksnota
Post Patron
Post Patron

I'm aware about SSMS but my company laptop won't allow me to run this program so I'm using the M Code of Power Query

What about Azure Data Studio?  Not allowed either?

 

If you don't know the structure of the SQL tables you will need to run some test queries like

 

SELECT TOP 100 * FROM GRV_CREDITORS

 

so you can see what the actual column name is.

tksnota
Post Patron
Post Patron

Hi,

 

I trimmed the 2 tables as shown but still have the error

 

tksnota_2-1735922090604.png

 

 

tksnota_0-1735921908999.png

 

tksnota_1-1735921939428.png

 

This seems to be a SQL specific issue.  Resolve it using SSMS.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Kudoed Authors