MYSQL ERROR
select distinct
EX_001_COMPETITION.EX_001_ID as competitionID,
EX_001_COMPETITION.EX_001_NAME as competition
from
EX_004_MATCH, EX_001_COMPETITION
where
EX_004_MATCH.EX_001_COMPETITION_ID = EX_001_COMPETITION.EX_001_ID
and ((EX_004_MATCH.EX_002_HOMETEAM_ID = 2083) or (EX_004_MATCH.EX_002_AWAYTEAM_ID = 2083))
and EX_004_MATCH.EX_004_SEASONEND = -1- and ((EX_004_MATCH.EX_002_HOMETEAM_ID = '2083' and EX_004_IHOMECAT='A') or (EX_002_AWAYTEAM_ID = '2083' and EX_004_IAWAYCAT='A' )) order by EX_001_COMPETITION.EX_001_NAME