- 1
- 2
- 3
- 4
- 5
str_sql = " select convert(varchar(6),e.id) as equipment_id,e.name as name,1 as is_check " +
" ,(select count(t2.id) from equipment t2 where t2.parent_id=e.id) count_child" +
" from equipment e " +
" where isnull(e.parent_id,0)=" + e.Node.Value +
" and id in (select cod from f_DisplayEqipmentContract_nodes_2(" + str_contract + "))";