matthew.lee-reedbusiness.com
-
4/3/2009 7:26:47 PM
API - TagInfoProvider.GetTags(taggroupname, siteid, where, order, topN) method
Hi,
I tried to use below method to pull tags from database.
TagInfoProvider.GetTags(taggroupname, siteid, where, order, topN)
It threw error because the dynamic sql query behind this method was incorrect. "Top N" has to place after they keyword "DISTINCT".
SELECT TOP 10 DISTINCT CMS_Tag.TagID, TagName, TagCount FROM CMS_DocumentTag JOIN CMS_Tag ON CMS_DocumentTag.TagID = CMS_Tag.TagID JOIN CMS_TagGroup ON CMS_Tag.TagGroupID = CMS_TagGroup.TagGroupID WHERE ( DocumentID IN ( SELECT DocumentID FROM View_CMS_Tree_Joined WHERE (TagGroupName = 'Content' AND TagGroupSiteID = 1)))
|