title: Joining back on the same table in SQL server
body: <p>I have a table like below</p>
  <p><a href="https://i.stack.imgur.com/wuO1F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wuO1F.png" alt="enter image description here" /></a></p>
  <p>And the output I require is</p>
  <p><a href="https://i.stack.imgur.com/OVrcW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OVrcW.png" alt="Output" /></a></p>
  <p>The match is defined on the basis of PO number. If PO number exists in both the sources then it should be <strong>match</strong> else <strong>only in AAP</strong> and <strong>only in SNW</strong> respectively. Can this be achieved?</p>
  <p>Thanks,
  Ani</p>