I have a very long SQL query in one of its paragraphs I need to control if a field dateA is equal to "01/01/1900" and if so it returns the value of another field dateB.
As I commented the query is very very long with other CASE, arguments, etc. .. in between. Then between the code there is a piece with T1.FechaA, T2.Import ... and I have added T1.FechaA (CASE WHEN T1.FechaA = '1900-01-01' THEN T1.FechaB END), T2.Import. .. but I get an error