sample XML query for tree control binding geographies

SELECT 1 AS [Tag],
0 AS [Parent],
NULL AS [geographies!1],
NULL AS [geography!2!ID],
NULL AS [geography!2!Name]
UNION
SELECT DISTINCT 2
,1
,NULL
,PopularGeoID
,Title
FROM PopularGeographyMaster
WHERE(@strSearch = '' OR (@strSearch!='' AND Title LIKE '%' + @strSearch + '%' ))
order by 4,5
FOR XML EXPLICIT

Comments

Popular posts from this blog

How to Read TOC Headings from word document using C#

List of special Characters in HTML