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:


vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link. http://www.microsoft.com/download...