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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
hse_france
New Member

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

Hi,

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 :

 

SET QUOTED_IDENTIFIER OFF
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

2 REPLIES 2
Rk_1411
Frequent Visitor

Did you ever solve this?

Anonymous
Not applicable

@hse_france 

 

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

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors