Join with table and sub query in oracle
- by Amandeep
I dont understand what is wrong with this query it is giving me compile time error of command not ended properly.The inner query is giving me 4 records can any body help me out.
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)
I am running it in oracle.
Thanks
Amandeep