Validation error using ISJSON in stored procedure within database project in Visual Studio 2022
Closed this issue · 1 comments
- SqlPackage or DacFx Version: 162.4.92.3
- .NET Framework (Windows-only) or .NET Core: both
- Environment (local platform and source/target platforms):
Steps to Reproduce:
-
Using SSDT, create a table: CREATE TABLE tbl_json([JsonData] NVARCHAR(MAX))
-
Using SSDT, create a stored procedure: CREATE PROCEDURE [dbo].[usp_TestJsonData]
AS
Select ISJSON( JsonData, VALUE ) From tbl_json -
The database project will not compile and the SQL error 71501 will be reported
SQL71501: Procedure: [dbo].[usp_TestJsonData] has an unresolved reference to object [dbo].[tbl_json].[VALUE].
The same error is thrown for the values of: OBJECT, ARRAY, and SCALAR
This issue is similar to that of: Export/extract validation error with ISJSON #375:
#375
- NOTE: this works fine in SSMS 20.2.30.0
Did this occur in prior versions? If not - which version(s) did it work in? This is newer functionality supported in SQL 2022 and Azure SQL Database, so it did not exist before.
(DacFx/SqlPackage/SSMS/Azure Data Studio)
It appears that this can be closed. The fix is in SSDT 17.12 Preview 4 per @ssreerama.