This sounds like kindergarten stuff, however, I am stuck. I have a .csv file. I am extracting only 6 out of 84 fields, I am adding each row to a temporary table for the purpose of sorting. I am selecting all rows using "ORDER BY" and write a new, different .csv file.
This used to work well when the date on the original .csv file was something like "06/12/2017" in other words it used to be MM/DD/YYYY. Now, my input is "6/12/2017" and when the day is i.e. "5" my input used to be "06/05/2017", now it is "6/5/2017". Because of that my final output has the date sequence of: 6/1/2017
6/1/2017
6/10/2017
6/12/2017
6/15/2017
6/3/2017
6/4/2017
6/6/2017
6/7/2017
6/9/2017
Looks like only the first digit of the month is being recognized. The date is written to the temp table as varchar(10).
Thanks for all your help.