Skip to content
Advertisement

Create a string from inserted.id via trigger

I’m creating a trigger on insert that will create a new record in another table using the id from the newly inserted row.

I need to format the id before I insert it into the other table. This is my code so far…. having problems creating the formated @PseudoID.

Advertisement

Answer

You can’t assign it to a variable within the trigger since there could be multiple rows, but you could do something like this to insert into the other table.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement