You can use something like insert into Clients_Birthday (clientId) select db-1.ClientIDfrom db-1 inner join db-2 on db-1.ClientID = db-2.ClientID where DATEPART(d, db-2.DOB= DATEPART(d, GETDATE()) AND DATEPART(m, db-2.DOB= DATEPART(m, GETDATE())
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)