I currently have the following case in my select statement:
I want to do another more complicated one but I cannot get it working. I have two dates. If date A is greater or equal to date B then I want date B to be null. I cannot seem to get comparasoms with other values to work. How would I write the select to make this work. Not sure if it makes any difference but both of the dates are MAX()s.
TIA
Code:
[COLOR=red]SELECT
CASE[/color] "Master"."InsFreq"
[COLOR=red]WHEN[/color] 1 [COLOR=red]THEN[/color] 12
[COLOR=red]WHEN[/color] 2 [COLOR=red]THEN[/color] 6
[COLOR=red]WHEN[/color] 3 [COLOR=red]THEN[/color] 3
[COLOR=red]WHEN[/color] 4 [COLOR=red]THEN[/color] 2
[COLOR=red]WHEN[/color] 5 [COLOR=red]THEN[/color] "Master"."SchedSpacing"
[COLOR=red]ELSE[/color] -1 [COLOR=red]END AS[/color] Freq ...
I want to do another more complicated one but I cannot get it working. I have two dates. If date A is greater or equal to date B then I want date B to be null. I cannot seem to get comparasoms with other values to work. How would I write the select to make this work. Not sure if it makes any difference but both of the dates are MAX()s.
TIA