Forum Discussion
Month sort difficulties when excluding year
- 9 years ago
Hey,
no you don't need to create an extra table.
Somehow there is a little glitch in your PeriodNbr column, the number 12 is assigned to May in the year 2016 and June in the year 2017. Have a closer look at the datetime may 2016, it's duplicate.
If you fix this the error will disappear.
Regards
Thanks for the suggestion but this returns the same error.
I have done this in another project where only 1 year of financial data was in the table and it works fine - so clearly the issue is because there are three of each month in the MonthName column and there are three of each PeriodNbr in that column.
I think the only solution will be to create another table that only stores the month name once and join the table to it using the PeriodNbr. Ultimately I dont think you should have to do this as the sort on the MonthName column in my example should be allowed by the PeriodNbr as you assumed - it just doesnt allow it.
Hey,
no you don't need to create an extra table.
Somehow there is a little glitch in your PeriodNbr column, the number 12 is assigned to May in the year 2016 and June in the year 2017. Have a closer look at the datetime may 2016, it's duplicate.
If you fix this the error will disappear.
Regards