I think the last condition in the AND clause is causing the problem. You can't have LIKE operator in a JOIN clause. You need to move the LIKE condition (MASTER_AGENT_ID LIKE '%APPLE%') in WHERE clause...
↧