question

AndrewKay-4380 avatar image
0 Votes"
AndrewKay-4380 asked TianyuSun-MSFT commented

Visual Studio - Build Error - Azure SQL Data Warehouse using 'SET RESULT_SET_CACHING ON/OFF'

We are attempting to use 'Build Solution' within a Visual Studio project for Azure SQL Data Warehouse. There are a number of Stored Procedures in the project that use the line 'SET RESULT_SET_CACHING OFF' (or on). This is valid Syntax in Azure SQL Data Warehouse (although not in SQL Server), the Stored Procedures currently exist on the Database and execute just fine.

When we try to build / publish, we get the error: SQL46010: Incorrect syntax near RESULT_SET_CACHING

In the Project Properties, the Target Platform is set as Azure SQL Data Warehouse. We've tried in both VS 2019 and 2022.

Is this just a bug / not implemented yet? and are there any potential workarounds?

Example:

CREATE PROC [dbo].[New_Procedure] AS
BEGIN
SET RESULT_SET_CACHING OFF;
SELECT
GETDATE()
END

The above is perfectly valid in Azure Data Warehouse

vs-generalazure-synapse-analytics
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AndrewKay-4380 , welcome to Microsoft Q&A forum. I am not very familiar with Azure SQL Data Warehouse and the related syntax, but from the error message, this issue should be caused by the syntax. Maybe some symbols are necessary, but I’m not sure. I help to add the azure-synapse-analytics tag and hope more related experts can help you solve this issue.

0 Votes 0 ·

0 Answers