ALTER TRIGGER [dbo].[trgErrorHandler] ON [dbo].[SMS_Out_Log] for insert AS BEGIN SET NOCOUNT ON DECLARE @MsgId varchar(18) DECLARE @FromNumber varchar(18) DECLARE @Tel varchar(18) DECLARE @Msg varchar(160) DECLARE @PriceGroup varchar(8) DECLARE @CampaignId varchar(8) DECLARE @Ok bit DECLARE @ErrorCode varchar(50) DECLARE @SentWithOperator varchar(8) DECLARE @Type varchar(18) DECLARE @Description varchar(max) SET @Ok = (select ok from INSERTED) IF (@Ok = 0) BEGIN SET @FromNumber = (select fromNumber from INSERTED) SET @SentWithOperator = (select SentWithOperator from INSERTED) SET @ErrorCode = (select ErrorCode from INSERTED) IF (@FromNumber = '5100' AND @SentWithOperator = '4711' AND @ErrorCode = '1030') BEGIN -- Message info SET @MsgId = (select msgID from INSERTED) SET @Tel = (select Tel from INSERTED) SET @Msg = (select msg from INSERTED) SET @PriceGroup = (select PriceGroup from INSERTED) SET @CampaignId = (select CampaignID from INSERTED) SET @Type = (select Optional2 from INSERTED) SELECT @Description = Optional1 from SMS_Out_Log where msgID = @MsgId -- Resend message from another number Insert into SMS_Out (fromNumber, Tel, msg, PriceGroup, Operator, Optional1, Optional2, CampaignID) values ('6300', @Tel, @Msg, @PriceGroup, '0', @Description, @Type, @CampaignId) END END END
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE