6 lines
		
	
	
		
			287 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
			
		
		
	
	
			6 lines
		
	
	
		
			287 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
select dbo.ve_getshortpath(ii.itemid) location, (select count(*) from vefn_ChildItems(ii.ItemID)) children 
 | 
						|
from Contents cc
 | 
						|
join Items ii on ii.contentid = cc.contentid
 | 
						|
where type = 20043
 | 
						|
and text in ('DEVICE', 'SETPOINT')
 | 
						|
order by (select count(*) from vefn_ChildItems(ii.ItemID)) desc |