I have a view table as below and I want to make the custom field named “number” to have as automatic sequence number (1,2,….) to be filled in the column CUSTOMFIELDVALUE according to REQUESTID
I need a trigger code on the WOCUSTOMFIELD table that do what I want
Thanks in Advance Lubna
The trigger grabs the max value from t and stores it in a table variable. The cte works out the row number of each insert to t and in the update phase adds it to the value stored int the table variable.