JSON_PATH_EXISTS() function no longer exists, though it did before.

Branwin DuBose 31 Reputation points
2022-06-16T13:43:21.313+00:00

I haven't changed my query, but the JSON_VALUE_EXISTS() function no longer exists on my server. It is no recognized as a built-in function name.

Azure SQL Database
Developer technologies Transact-SQL
{count} votes

Accepted answer
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2022-06-16T22:02:57.137+00:00

    I tested on one of my Azure databases, and indeed, I get the error 'JSON_path_EXISTS' is not a recognized built-in function name.

    I am under the impression that updates are being rolled out over a period of time. So if you have a serverless database, it could be loaded to different machines at different occasions, and these machines could have different versions of the SQL Server executable, but this does not reflect in @@version.

    I don't think the compat level has anything to do with it, because a new built-in scalar function does not need protection by compat level, as the name cannot clash with a user function.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Tom Phillips 17,771 Reputation points
    2022-06-16T16:24:07.82+00:00

    JSON_VALUE_EXISTS is a new feature of Azure SQL and SQL Server 2022 (in preview). This feature does not exist in prior versions of SQL Server.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.