Dynamically create columns in a temp table and generate pivot report

Sample Data download: http://goo.gl/lcOf8z Generate excel report as below. Username, Address, City, State, Zip, Question 1, Question 2, Question 3, ….. Prakash, test, anand, gujarat, 388001, Answer 1, Answer 2, Answer 3,.. Chirag, test, anand, gujarat, 388001, Answer 1, Answer 2, Answer 3,.. SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO — ============================================= — Author: …

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( // Each parentheses group (or ‘capture’) in this regex becomes an argument // to the function; in this case, every argument after ‘match’ /^([-+]?)(0?)(\d+)(.?)(\d+)$/g, function(match, sign, zeros, before, decimal, after) { // Less obtrusive than adding ‘reverse’ method …