I have two tables one is master table a another table is transaction table ,I want the output like master table all data and transaction table status only
Table a:
CategoryId CategoryName
1 C#
2 Java
3 Angular
4 React
5 C++
Table b:
CategoryId Status
1 Closed
3 Closed
OutPut:
CategoryId CategoryName Status
1 C# Closed
2 Java Open
3 Angular Closed
4 React Open
5 C++ Open
thanks you guys, I am waiting for your replys...

Ramachandran MPosted Dec 6, 2019, 4:32 AM
Ramachandran MPosted Dec 6, 2019, 5:42 AM
siva balanPosted Dec 6, 2019, 4:22 AM
Ramachandran MPosted Dec 6, 2019, 4:18 AM
siva balanPosted Dec 6, 2019, 4:13 AM
Ramachandran MPosted Dec 5, 2019, 11:50 PM
SELECT T1.CATEGORYID,T1.CATEGORYNAME,CASE WHEN T2.[STATUS] IS NULL THEN 'OPEN' ELSE T2.[STATUS] END 'STATUS' FROM TABLE1 T1
LEFT JOIN TABLE2 T2 ON T1.CATEGORYID = T2.CATEGORYID