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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors