Hi, how I can create a column with case when I need another case in "then"; here is my problem: fyi, tyear is 4 diget and year is 2 diget; what I'm doing wrong?
Code:
[Year]= case when isnull(t.status,'') <> 4 then case when rigth(t.[Year],2)< rigth(t.[tYear],2) then when t.[Year] <= 12 then '20'+t.[Year] else '19'+t.[Year] end else t.[tYear] end from table
Comment