title: compare one row with multiple rows
body: <p>Ex: I have other main table which is having below data </p>
  
  <pre><code>Create table dbo.Main_Table
  (
  ID INT,
  SDate Date
  )
  Insert Into dbo.Main_Table   Values (1,'01/02/2018')
  Insert Into dbo.Main_Table   Values (2,'01/30/2018')
  
  Create table dbo.test
  (
  ID INT,
  SDate Date
  )
  Insert Into dbo.test Values (1,'01/01/2018')
  Insert Into dbo.test Values (1,'01/02/2018')
  Insert Into dbo.test Values (1,'01/30/2018')
  
  Insert Into dbo.test Values (2,'10/01/2018')
  Insert Into dbo.test Values (2,'01/02/2018')
  Insert Into dbo.test Values (2,'01/30/2018')
  </code></pre>
  
  <p>I would like to compare  data in main table data with test table. We have to join based on ID and if date match found then "yes" else "No". We have to compare one row with multiple rows.</p>
  
  <p>Please let me know if any questions , thanks for you;re help</p>