if it were me doing it, i would simply put the WHERE condition inside the UNION, in each subselect
SELECT Name, Autor, Typ, Dateiname
FROM dokumente
WHERE Name = some_name
UNION
SELECT at.Arbeitsname, ut.Name, at.Type, at.filename
FROM users_table ut
INNER JOIN arbeiten_table at
ON at.AuthorID=ut.ID
WHERE at.Arbeitsname= some_name
if you really want to add the WHERE clause to the outside of the union, you may need to write it like this --
SELECT *
FROM (
SELECT Name, Autor, Typ, Dateiname FROM dokumente)
UNION
SELECT at.Arbeitsname, ut.Name, at.Type, at.filename
FROM users_table ut
INNER JOIN arbeiten_table at
ON at.AuthorID=ut.ID
)
WHERE Name = some_name
rudy
http://r937.com