Incorrect usage of UDF IsDescendantOf

DECLARE @Parent HIERARCHYID = '/'

SELECT *
FROM Customers_Hierarchy
WHERE CustomerHierarchy.IsDescendantOf(@Parent) = 1

Hi,

I'm trying to understand the SQL Prompt warning which says this is an incorrect usage of const UDF.
Tagged:

Answers

Sign In or Register to comment.