, если существует таблица, соответствующая вашим полям:
insert into mytable
select Distinct h.CustomerCode, h.BillName, h.BillAddress1 From hist2 h where not exists (select CustomerCode From tblCustomer c Where c.CustomerCode=h.CustomerCode)
если он не соответствует вашим полям, вы должны указать поля, как и во всех вставках:
insert into mytable (customercode, billname...)
select Distinct h.CustomerCode, h.BillName, h.BillAddress1 From hist2 h where not exists (select CustomerCode From tblCustomer c Where c.CustomerCode=h.CustomerCode)
если таблица не существует, вы хотите использовать Select Into