I am trying to do something that I feel is pretty simple but can't find the answer anywhere.
I'm bringing in columns from an existing table, I'm also adding a case when condition to a few of these columns and I also need to convert the data types of those fields.
A section of what I have right now before converting the data type is this:
(Case When [Group]=null then 'Unknown' else [GROUP] end) as
Order by blah;
How do I bring the Group column in as a date while also using the case where/then/else?
I tried to put this in front as this is how I've converted the columns that don't require conditions (I need UK date format)...
convert(varchar, StatusChangeDate, 103)
But it brings up Incorrect syntax near the keyword 'Case'.