Here I am using c#
code for retrieving the data from the database to spreadsheet when I am writing the query (SqlCommand
) to retrieve all columns and distinct for one column it's showing error that
Cannot set Column 'date' to be null. Please use DBNull instead.
Here is my query :
select distinct on columnname *
from tablename
Where I am missing can anyone help me?