Also having this issue. its a bugger to say the least
Azure Data Warehouse function has problem when we create dacpac file in Visual studio 2019
I have created a database project where my source and target is Azure SQL Datawarehouse in Visual Studio 2019 by importing the database. When I perform build, it throws me an error for function as below:
Error SQL71636: You cannot use types or statements that modify the database state.
Below is the function definition used:
CREATE FUNCTION [dbo].[fn_Customer] (@CustomerId [bigint]) RETURNS TABLE
AS
RETURN (
SELECT CustomerId,CustomerEmail
FROM Dimcustomer WHERE CustomerId = @CustomerId
)
Since this is already present in the Datawarehouse it should not create an issue while creating a dacpac file. Can you let me know if anyone has faced similar issue?
7 answers
Sort by: Most helpful
-
-
Vicky G 1 Reputation point
Nov 9, 2022, 7:35 AM I encountered same error while building project having a function. Is there any update on this issue yet? Is there any work around?