I realize this is a newbie question, but I’m looking for a simple solution.
I loaded a csv file into DataTable. Let my CSV contains four columns (ColorCode, SirtID, StartDate, EndDate) like this:
#ffffff,s0012,2011/05/01,2011/05/11 #ffffff,s0013,2011/05/03,2011/05/10 #ffffff,s0022,2011/06/01,2011/06/11 #ffffff,s0032,2011/05/01,2011/05/12
I want to return an error message if CSV file contained two or more different ColorCodes like this:
#ffffff,s0012,2011/05/01,2011/05/11 #ffffff,s0013,2011/05/03,2011/05/10 #ffffff,s0022,2011/06/01,2011/06/11 #000000,s0032,2011/05/01,2011/05/12
What’s the best way to check whether CSV file contained only one ColorCode?
You could do