Hi .
why this query does not work ?
SELECT TOP 50 * FROM
SELECT fIDUser1 AS fIDUser FROM UserFeature.Relationship WHERE fIDUser2=5 AND fIDStatus=141
UNION ALL
SELECT fIDUser2 AS fIDUser FROM UserFeature.Relationship WHERE fIDUser1=5 AND fIDStatus=141)
when execute show error :
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'FROM'.
Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'SELECT'.
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near ')'.