I am wacking my head over the problem with this code.
DECLARE @root hierarchyid DECLARE @lastchild hierarchyid SELECT @root = NodeHierarchyID FROM NodeHierarchy WHERE ID = 1 SET @lastchild = getlastchild(@root)
It says it does not recognize getlastchild
function. What am I doing wrong here?
We cannot call store procedure within a function. However, we can call a function within a store procedure.
try including the schema id, as in
@lastchild = dbo.getlastchild(@root)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With