i want to display all employee whether their Datetime (A_Date) exit or not.
here is my data.
create table #EmpMaster(EnrollNumber int,EmpName varchar(max))
Create table #AttendenceLOG(ID int,EnrollNumber int,A_Date datetime)
insert into #EmpMaster values
(1001, 'Andrea'),
(1002, 'pandeyism'),
(1003, 'dharmendr'),
(1004, 'Mudassar'),
(1005, 'Akhter'),
(1006, 'Rehan'),
(1007, 'Irfan')
insert into #AttendenceLOG values
(1,1001, '2019-05-28 17:18'),
(2,1002, '2018-05-28 17:18'),
(3,1003, '2018-05-28 17:18'),
(4,1006, '2018-05-28 17:18')
expected output is
EnrollNumber |
Name |
A_Date |
1001 |
Kashif |
2019-05-28 17:18 |
1002 |
Kami |
2018-05-28 17:18 |
1003 |
Ali |
2018-05-28 17:18 |
1004 |
Farhan |
|
1005 |
Akhter |
|
1006 |
Irfan |
2018-05-28 17:18 |