It depends on what defects are but will assume here that they are static defined things since you called them codes. Then 2 primary tables - tblDepts and tblDefects, each not allowing duplicates of department or defect. You also need a junction table. Picture tblDepts on one side and tblDefects on the other with tblDeptDefects in between. This one is a many-to-many table; i.e. the same department can appear many times and the same defect can appear manytimes. Whether or not a combination can appear more than once is determined by your needs.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.