Help with SQL Server Trigger to truncate bad data before insert
问题 We consume a web service that decided to alter the max length of a field from 255. We have a legacy vendor table on our end that is still capped at 255. We are hoping to use a trigger to address this issue temporarily until we can implement a more business-friendly solution in our next iteration. Here's what I started with: CREATE TRIGGER [mySchema].[TruncDescription] ON [mySchema].[myTable] INSTEAD OF INSERT AS BEGIN SET NOCOUNT ON; INSERT INTO [mySchema].[myTable] SELECT SubType, type,