There are a lot of wrapped operations for managed metadata, unfortunately, not too many working examples... You may be able to take advantage of the operation: GetChildTermsInTerm, but I've never used this. I just tried briefly to create an example, but nothing good came from it except how to find the GUID for your term sets:
http://social.msdn.microsoft.com/forums/en-US/sharepointgeneralprevious/thread/63553372-b87f-4d69-8d4c-63fb8a7b3c6d
Cheers,
Matthew
http://social.msdn.microsoft.com/forums/en-US/sharepointgeneralprevious/thread/63553372-b87f-4d69-8d4c-63fb8a7b3c6d
select ECMGroup.Name as GroupName , ECMTermSet.Name as TermSetName, ECMTermLabel.Label, ECMTerm.UniqueId
from dbo.ECMGroup
left outer join dbo.ECMTermSet on ECMGroup.Id = ECMTermSet.GroupId
left outer join dbo.ECMTermSetMembership on ECMTermSetMembership.TermSetId = ECMTermSet.Id
left outer join dbo.ECMTerm on ECMTerm.Id = ECMTermSetMembership.TermId
left outer join dbo.ECMTermLabel on ECMTermLabel.TermId = ECMTerm.Id where ECMGroup.Type = 0
order by ECMTermSetMembership.Path
Don't tell anyone, but you'll have to run that query directly against the database... There are other ways to do this (think supported by Microsoft), but whatev... ;-)Cheers,
Matthew