I was asked to write a single SQL SELECT statement that would return "1st Quarter" or "2nd Quarter" or "3rd Quarter" or "4th Quarter" based on a date column.
I know that I can call some SQL functions to cast the date into month and from there, I can see if it falls within a specific quarter of the year. However, I don't know how to return the value being asked for. This value ("1st Quarter" or "2nd Quarter" or "3rd Quarter" or "4th Quarter") is not contained in a column.
Anyone has an idea?


Reply With Quote
Bookmarks