Month: March 2014

Posted in SQL Server Uncategorized

Attendance UNPIVOT first then Pivot for count present, absent etc in SQL

Sample data download: here Declare @tempAttendance table(EmpID int, EmpName varchar(50), edate int, ecode varchar(5)) insert into @tempAttendance…

Posted in SQL Server Uncategorized

Dynamically create columns in a temp table and generate pivot report

Sample Data download: Generate excel report as below. Username, Address, City, State, Zip, Question 1, Question…

Posted in JavaScript Uncategorized

Add Comma into number using javascript

<script> addCommas = function(input){ // If the regex doesn’t match, `replace` returns the string unmodified return (input.toString()).replace(…