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

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.

error when merging queries

I am trying to merge two queries I have already created, which work properly, and get the following error message.

 

DataSource.Error: Microsoft SQL: Parse error at line: 27, column: 332: Incorrect syntax near 'from'.
Details:
    DataSourceKind=SQL
    DataSourcePath=prpdw,17001;Lawson
    Message=Parse error at line: 27, column: 332: Incorrect syntax near 'from'.
    Number=103010
    Class=16

Status: New
Comments
Anonymous
Not applicable

Well,

        Seems to me yourcode has some problem, specifically syntax error on line 27, column 332.

 

please check you code properly and debug the code

v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

It looks you are using the T-SQL query to merge tables in Power BI desktop, right? 

 

If it is, would you please run the same T-SQL query in SSMS to ensure it's working fine. 

 

Also you can share the T-SQL so we can find where is the problem. 

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable

Actually both queries where direct from our source mart and I am just using the Merge Queries option under combine. There isn't any coding to provide.

Anonymous
Not applicable

Sorry I should have mentioned everything works fine during the first step of the merge works just fine. The error occurs when I try to expand the table.

v-qiuyu-msft
Community Support

Hi @Anonymous,

 

Which Power BI desktop version do you run? Please try the latest Power BI desktop version 2.67.5404.801 check if the same issue occurs. 

 

Also you can enable the desktop trace log, repeat steps to merge and expand columns to reproduce the issue, check if there is any detail error information in the trace log files. 

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable

I removed the trim step in my queries and it is now working.