select territoryId, name as territoryName, territoryPath from tbl_TER_Territories with (nolock) where ownerId = and fsl_tablecode = and territoryId != order by territoryPath for json path, include_null_values