may be this;-Insert Into tbl_Config_CarrierCodes ( CODE, CARRIER )Select ltrim(PUPNUM), rtrim(PUPNAME1) + rtrim(PUPNAME2)FROM tbl_Buffer_CarriersPalletsContainersWHERE NOT EXISTS (Select CODE, CARRIER FROM tbl_Config_CarrierCodes WHERE tbl_Buffer_CarriersPalletsContainers.PUPNUM = tbl_Config_CarrierCodes.CODE )AND PUUP = 'scac'
but i'm not sure this is what you want as i couldnt get much idea from your explanation. You would sound more clearer when you illustrate what you want with some table data.