-- test data
select Parent = 'P001'
, Child = 'C002'
, Usage = 2.000
select Parent = 'C002'
, Child = 'K003'
, Usage = 1.000
select Parent = 'K003'
, Child = 'T001'
, Usage = 0.027
-- recursive call
, CAST(a.Parent +'.'+ a.Child as varchar(50))
, CAST(a.Usage as numeric(9,3))
FROM #temp a
JOIN #temp b ON a.Parent = b.Child
WHERE b.Child IS NULL
, CAST(a.Hierarchy + '.' + b.Child as varchar(50))
, CAST(a.usage * b.usage as numeric(9,3))
, a.Level + 1
FROM recursive_CTE a
JOIN #temp b ON a.Child = b.Parent
Open in new window
This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.
Join & Ask a Question
Join our community for more solutions or to ask questions.
For immediate help use Live now!