where m.code=dic.A_CODE and m.type="A" where m.code=dic.E_CODE and m.type="E" ...