Guest User

Untitled

a guest
Jan 16th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Dim cmd As New SqlCommand("select Branch_Code,Branch_Name,Sector,Region_name,SUM(case when Days_Number =0 then 1 else 0 end )as Same_Day,SUM(case when Days_Number =1 then 1 else 0 end)as Next_DAy, SUM(case when Days_Number =2 then 1 else 0 end)as After_Two_Days,SUM(case when Days_Number >2 then 1 else 0 end)as Same_Week,sum(case when Days_Number = 'Wait' then 1 else 0 end)as Not_Installed_Yet from Main_Report_Working_Area where Starting_Date>=@Starting_Date and Starting_Date2<=@Starting_Date2 and ADV_Code =20 group by Branch_Code,Branch_Name,sector,Region_name", connsqlserver)
Add Comment
Please, Sign In to add comment