79582520

Date: 2025-04-19 14:56:46
Score: 1
Natty:
Report link

Sorry the code submitted includes reference to the superseded column which in not relevant to this question. Only this is needed:

CREATE TRIGGER [dbo].[AddSpecificationID]
   ON  [dbo].[Specification]
   AFTER INSERT
AS 
BEGIN
    SET NOCOUNT ON;
    Update Specification
    Set SpecificationID = EntryID 
    where isnull(SpecificationID,0) = 0
END
GO

This worked on MS SQL

Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: AMF