Indeed, it does not seem to be your lucky day. Look here:
https://learn.microsoft.com/en-us/sql/t-sql/queries/select-for-clause-transact-sql?view=sql-server-ver15
Synapse is not listed, so you cannot do FOR JSON or FOR XML on Synapse.
Using JSON AUTO in Azure Synapse Analytics SQL pool
Hi all,
I am working with JSON data in SQL Server using Synapse Analytics. The following query is returning syntax error
SQL Error [103010] [S0001]: Parse error at line: 4, column: 1: Incorrect syntax near 'FOR'.
SELECT TOP 5 [qualifier], [textline]
FROM [intg].TestTable
FOR JSON AUTO
Not sure if JSON AUTO is supported. Has anyone used it in Synapse?
Thanks,
Shafique
-
Erland Sommarskog 113.5K Reputation points MVP
2021-01-22T22:31:24.953+00:00
1 additional answer
Sort by: Most helpful
-
HimanshuSinha-msft 19,476 Reputation points Microsoft Employee
2021-01-22T23:22:19.44+00:00 Hello @Nasir, Shafique ,
Thanks for the ask and using the forum .
At this time FOR JSON AUTO is not supported by Synaspse .May I request you to please log the ask here . The feature ask are reviewed by the product group and this should help them .
Thanks
Himanshu