inserting @@Identity in during a merge statement

By | July 12, 2018

I have a table with a column named cert_number. In this column, the value is generated every time a new entry is made. I am doing a merge statement to bulk fill this table and I would like to be able to say, when not matched... insert cert_number values @@identity.

Example:

WHEN NOT MATCHED BY TARGET
INSERT (Cert_number)
VALUES (@@Identity)

I don't believe this will work though as the identity is created after an entry is made as an output. If that is the case that this won't work, how could I insert the identity during a merge procedure?