Database & SQL

Put a If not exists at top, e.g.

if not exists (
select curve
from ImportInstrumentToRFMap
where sensitivityType = 'Credit Spread'
and instrumentType = 'ABS'
and curve = 'CENTURYTEL INC'
and tenor = '3Y'
and tenor2 = 'N/A'
)
insert into  ImportInstrumentToRFMap (
sensitivityType, instrumentType, curve,
tenor, tenor2, riskFactor, userName, updateDate )
select  'Credit Spread', 'ABS',
'CENTURYTEL INC', '3Y', 'N/A',
'CRDS_ABS_RMBS_NONAGENCY', 'batch', '20101025'