Knowledge: SQL to Lookup Root Taxonomy Level
Back
Knowledge
Title*SQL to Lookup Root Taxonomy Level
ManualAdministration
Manual Level TwoData Actions
Created14/01/2019
DetailTo lookup root taxonomy level use the below SQL.
DECLARE @TaxonomyID as int = (TaxonomyID of Taxonomy Required)
SELECT Name, Value + '|' + RTRIM(LTRIM(CAST(ID as nvarchar(max)))) as Value FROM TaxonomyEntries WHERE ISNULL(ParentEntryID,0) = 0 AND TaxonomyID=@TaxonomyID Order By Name
If using in a Data Action dropdown would recommend having Value as Value field as that is what is usually stored in an Item when a normal taxonomy is used.
Additional Manual Locations