I have a report in which in one data item while writing case statement i need to check two name columns contains same name or not(condition 1).
Similarly i need to check if date matches between two date columns(condition 2).
I am writing
case
when
(condition 1) and (condition 2)
then
end
Can i directly compare by keeping = between the two columns or is there separate syntax for comparing two text and date columns.
Thanks,
Mark
If I'm reading your question correctly (and forgive me if I'm not), you can certainly write a calculation that's along the lines of:
Case
when [Field1] = [Field2] and [Date1] = [Date2] then 'Success'
else 'Failure'
End
You might need to do some fiddling with formats, for example casting the dates if you need to get rid of time elements, or trimming text fields to get rid of trailing spaces.
Thanks Chris