Showing results for 
Search instead for 
Did you mean: 
New Member

Incorrect syntax near the keyword 'SET'. Incorrect syntax near ')'


I have a problem with my query.

I use SQL server and I need to access data in real-time. I create a connector with SQL Database on DirectQuery.

My query is :


SELECT * FROM OPENQUERY(INSQL, "SELECT DateTime, [A0CAR6505CDEC], [A0M/SE1VITCISAILL], [#A5MPVREJTH/SI], [A0MPVFI73/16B1], [A0MPVFI73/26B1], [A0MPVFI73/36B1], [% charge plaques zone 1], [% charge plaques zone 2], [% charge plaques zone 3], [debit gaz total sechoir], [E0LARGPL/EC], [Ratio fibre de verre]
FROM WideHistory
WHERE wwRetrievalMode = 'Cyclic'
AND wwCycleCount = 10000
AND wwQualityRule = 'Extended'
AND wwVersion = 'Latest'
AND DateTime >= '20200901 00:00:02.000'
AND DateTime <= GetDate()")


I see data when I validate, I can choise between Load or Transform data. When I load data, I have message of subject. When I transform data, I have access to visualisation of my data, I can add request, filter, etc... When I apply, I have message of subject.


I don't understand why, can you help me please?


Thank you

Solution Sage
Solution Sage



Why "set quoted identifier off"? Why "OPENQUERY"? Why not get the data directly from SQL Server? If you really need to use such a long-winded way... why not try to use EXEC AT?

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors