Maybe I'm missing something, but it looks like the coverage values, 01, 30 , 31 are redundant information, and that the information about policy coverage is not only already in your database, but intrinsic in the same table. If I have that all correctly, then I would use similar code to...