How can I Insert when not in table and when max timestamp T-SQL
I used a CTE with just one column that is the maxtime from tb2. Then join on the CTE and reference it when checking for if its the max or not.

WITH aggregateTime (maxTime) AS (
SELECT MAX(STime) AS maxTime 
FROM tb2
)
INSERT INTO db.dbo.tb1
SELECT *
FROM tb2 
INNER JOIN aggregateTime ON 1=1
WHERE tb2.STime = aggregateTime.maxTime AND EMPNO NOT IN (SELECT EMPNO FROM tb1);