SELECT A1.Word, A1.WebAgentID, A2.Word AS AgentWord, A2.WebAgentID AS Agent
FROM dbo.tblTranslateNewCopy A1
LEFT OUTER JOIN dbo.tblTranslateNewCopy A2 ON A1.WordID = A2.WordID AND A2.WebAgentID = 28
WHERE A1.WebAgentID = 1
--------
SELECT A1.Word, A1.WebAgentID, A2.Word AS AgentWord, A2.WebAgentID AS Agent
FROM dbo.tblTranslateNewCopy A1 LEFT OUTER JOIN
dbo.tblTranslateNewCopy A2 ON A1.WordID = A2.WordID
WHERE (A1.WebAgentID = 1) AND (A2.WebAgentID = 28 OR A2.WebAgentID IS NULL)
|