Incorrect usage of UDF IsDescendantOf
Andy_H
Posts: 1 New member
in SQL Prompt
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.
As far as I can see, this is the correct way to use IsDescendantOf
https://docs.microsoft.com/en-us/sql/t-sql/data-types/isdescendantof-database-engine?redirectedfrom=MSDN&view=sql-server-ver15
Tagged:
Answers
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?