SQL Query for In/Out time attendance with null row when date not in table1
问题 I have a two table with the below sample output. tb1 is in time and tb2 is out time I want to build a query to achieve the below results with null values if row in tb2 not in tb2 or row in tb1 not in tb1: i need get null if OINDX in table2 and not in table1 or IINDX in table1 and not in table2 and if date not in dates between two date get null row with date only like this photo this code to create two tables to try code and help me CREATE TABLE [dbo].[TIMEIN]( [IINDX] [int] NULL, [USERID]