SELECT abbreviation, description
FROM afkortingen
WHERE abbreviation LIKE 'm%'
UNION (
SELECT afkorting human_abbreviation, naam description
FROM materieel
WHERE human_abbreviation LIKE 'm%'
)
ORDER BY abbreviation ASC
Echter deze lijkt niet het juiste veld van 'human_abbreviation' op te halen?
Ik heb dus deze tables:
afkortingen
met abbreviation en description
en
materieel
met o.a abbreviation en human_abbreviation
Nu koppelt hij blijkbaar steeds abbreviation in de UNION in plaats van human_abbreviation. Hoe komt dat? Of zie ik iets over het hoofd? Sta me al een kwartier op de query te staren, maar ik kom er niet uit.