Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MERGE INTO NetworkElementAttributeTypes AS Target
- USING (VALUES
- (49, N'Lower Leakage limit', 2),
- (48, N'Upper Leakage limit', 2)
- )
- AS Source ([NetworkElementAttributeTypeId], [NetworkElementAttributeTypeName], [AttributeDataTypeId])
- ON Target.[NetworkElementAttributeTypeId] = Source.[NetworkElementAttributeTypeId]
- -- update matched rows
- WHEN MATCHED THEN
- UPDATE SET [NetworkElementAttributeTypeId] = Source.[NetworkElementAttributeTypeId],
- [NetworkElementAttributeTypeName] = Source.[NetworkElementAttributeTypeName],
- [AttributeDataTypeId] = Source.[AttributeDataTypeId]
- -- insert new rows
- WHEN NOT MATCHED BY TARGET THEN
- INSERT ([NetworkElementAttributeTypeId], [NetworkElementAttributeTypeName], [AttributeDataTypeId])
- VALUES ([NetworkElementAttributeTypeId], [NetworkElementAttributeTypeName],[AttributeDataTypeId]) ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement