Thursday, May 8, 2014

sql row value wise count

Query:

 SELECT   COUNT(CASE WHEN DayStatusID = 1 THEN 1 END) AS A,  
             COUNT(CASE WHEN DayStatusID = 7 THEN 1 END) AS B,  
             COUNT(CASE WHEN DayStatusID = 3 THEN 1 END) AS C  
 from Payroll_tblYearMonthDayEntry  

Result:


C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...