I have procedure where I am getting data from my 1st temp table like below
2nd temp table like below
Now I need to join this 2 temp tables to get all matching and unmatching data .My result would be like below
But I am getting only matching data.Please help how to do
Advertisement
Answer
I think that’s a full join
:
select coalesce(t1.agentName, t2.agentName) agentName, coalesce(t1.completedTickets, 0) completedTickets, coalesce(t2.activeTickets, 0) activeTickets from t1 full join t2 on t2.agentName = t1.agentName