

"select distinct d.distcd,D.statname,d.Distname,b.blkcd,B.BLKNAME,c.clucd,c.cluname,v.vilcd,v.vilname,m.schcd,s.schname,u.* 

from UDISESDMISDec.dbo.steps_master m left join  

UDISESDMISDec.dbo.STEPS_DISTRICT1617 D on(substring(M.schcd,1,4)= D.DISTCD) Left join 

UDISESDMISDec.dbo.STEPS_BLOCK1617 B on (substring(M.schcd,1,6) = B.Blkcd) Left join 

UDISESDMISDec.dbo.STEPS_CLUSTER1617 c on(m.clucd=c.clucd) left join 

UDISESDMISDec.dbo.STEPS_VILLAGE1617 v on(m.vilcd=v.vilcd) left join 

UDISESDMISDec.dbo.STEPS_SCHOOL S on(M.schcd = S.schcd) left join  

UDISESDMISDec.dbo.STEPS_STUDATA_dec2017 u on (m.schcd collate SQL_Latin1_General_CP1_CI_AS =u.schcd collate SQL_Latin1_General_CP1_CI_AS ) 

where �substring(M.schcd,1,2)=07 and u.ac_year='2016-17' and u.CURCLASS=5 

order by 1,2,3,4"


