I am trying to strip all non numeric characters from a field in a sql table and insert it back into another field in the same table. The original field is a string field and the destination is an INT field. Below is the basic transfer trigger, but will not work because of string to int. I need the sql code to remove the non numeric characters before the insert.
Thanks in advance.
CReate TRIGGER [dbo].[trg_update_Trailerchange2] on [dbo].[tbl_TrailerInfoTHisONe] FOR UPDATE AS
SET SemiTrlCopy = SemiTrlNo
FROM tbl_TrailerInfoTHisONe INNER JOIN deleted d
on tbl_TrailerInfoTHisONe.TrailerID = d.TrailerID