Skip to content

Tag: sql-server

Dynamically selection of Column Name

I want to select Column Name which has non null and non zero value. So any column name which has 0 or NULL should not be displayed in the output grid I have the Source table as below I want to group by Col1 and Display Col1, MIN(Col2), MIN(Col3), MIN(Col4) and ColRes as (Name of the column with value more

Cannot exclude previous non-duplicate rows

In a nutshell, here it is: I have 1000(ish) employees who have multiple recurrent annual training requirements I need to be able to sort the employees by County, Facility, Employee, and Type of Training (and also allow for sorted lists at each level) I want to display only the most recent date the Employee to…