Hi,
I have a problem where I need to search on data set with 5 fields.
Field 1 - Account number
Field 2 - Date
Field 3 - Person1
Field 4 - Person2
Field 5 - Person3
The data sat contains two months of data (November and October).
I need to compare if any of the Persons have an 'X' in the specific field both months.
So I have this statestatement
(Case when
((Date = 'Nov' AND Person1 = 'X') AND (Date = 'Oct' AND Person1 = 'X'))
OR
((Date = 'Nov' AND Person2 = 'X') AND (Date = 'Oct' AND Person2 = 'X'))
OR
((Date = 'Nov' AND Person3 = 'X') AND (Date = 'Oct' AND Person3 = 'X'))
Then 1 ELSE 0)
This statement is the statement I want however it needs to check the specific account number in November matches the account number in October. If the Account numbers do not match then there is no reason to run through the check.
Any thoughts?
thanks!