title: Join with table and sub query in oracle
body: <p>I don't understand what is wrong with this query. It is giving me a compile time error of "command not ended properly".</p>
  
  <p>The inner query is giving me four records.</p>
  
  <pre><code>select WGN3EVENTPARTICIPANT.EVENTUID 
  from 
      (Select WGN_V_ADDRESS_1.ADDRESSUID1 as add1,
              WGN_V_ADDRESS_1.ADDRESSUID2 as add2 
       from WGN3USER inner join 
            WGN_V_ADDRESS_1 on WGN_V_ADDRESS_1.USERID=wgn3user.USERID 
        where WGN3USER.USERNAME='FIRMWIDE\khuraj'
      ) as ta
      ,WGN3EVENTPARTICIPANT 
   where (ta.ADDRESSUID1=WGN3EVENTPARTICIPANT.ADDRESSUID1) AND    
         (ta.ADDRESSUID2=WGN3EVENTPARTICIPANT.ADDRESSUID2)
  </code></pre>
  
  <p>I am running it in Oracle.</p>