I need assistance writing a SQL script. I need to pull in values from my DoctorFacility table into my cusLedgerCode table where the DoctorFacilityId is not found within the cusLedgerCode table. The values I need in the LastDate are '2006-12-31 00:00:00.000' and '2007-12-31 00:00:00.000'.
So I need to insert 2 entrys for every DoctorFacilityId not found in the cusLedgerCode table. One for the 2006 date and one for the 2007 date. DoctorFacilityId, ListName and Ledger are all values in my DoctorFacility table that will need to pull into the cusLedgerCode