|
Sybase - prevent duplicate keys on insert |
|
|
|
|
Written by Steve Leonard
|
|
Friday, 29 October 2010 09:12 |
|
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'
|
|
Last Updated on Monday, 08 November 2010 21:10 |