Hi all
I am new to the forum and have a problem I was hoping someone could help me with. I have a table that I am trying to write an if statement for. Please see sample below. The idea is to populate the "Y/N" column by comparing the "MEMNO" and the "BEGDATE" and determine whether or not there is both a "SICK" and "PREVENTIVE" type for the same MEMNO on the same BEGDATE. Any suggestions would be appreciated. Thanks in advance.
MEMNO BEGDATE SERVCODN TYPE Y/N ABC 01/11/16 99395 SICK ABC 01/11/16 99213 PREVENT ABC 01/11/16 99213 PREVENT ABC 01/11/16 99213 PREVENT DEF 05/31/16 99397 SICK DEF 05/31/16 99213 PREVENT GHI 02/16/16 99397 SICK GHI 02/16/16 99213 PREVENT MNOP 02/29/16 99214 PREVENT MNOP 02/29/16 99396 SICK QRS 04/04/16 99396 SICK QRS 04/04/16 99213 PREVENT TUV 01/29/16 99396 SICK TUV 01/29/16 99214 PREVENT XYZ 04/29/16 99397 SICK XYZ 04/29/16 99213 PREVENT ABC1 02/03/16 99396 SICK ABC1 02/03/16 99213 PREVENT