Quantcast
Channel: Microsoft Dynamics GP Forum - Recent Threads
Viewing all articles
Browse latest Browse all 32807

SQL Trigger on SOP10100 Table not firing - See trigger below

$
0
0

I am trying to write a trigger on SOP10100 table to insert into the Location field from the Location_Segment field from SVC00600 table. All seems OK however it won't fire. Any ideas greatly appreciated

USE [TEST]

GO

/****** Object:  Trigger [dbo].[SOP10100_LINK_SVC00600_AFTERINSERT]    Script Date: 07/23/2013 08:31:38 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER TRIGGER [dbo].[SOP10100_LINK_SVC00600_AFTERINSERT]

ON [dbo].[SOP10100]

FOR INSERT

AS

BEGIN

UPDATE SOP10100

SET SOP10100.LOCNCODE = SV.LOCATION_SEGMENT

FROM INSERTED

INNER JOIN SVC00600  SV ON sv.CONTNBR = INSERTED.REFRENCE

WHERE SOP10100.[CUSTNMBR] = INSERTED.[CUSTNMBR]

AND SOP10100.[DOCAMNT] = INSERTED.[DOCAMNT]

AND INSERTED.REFRENCE <> ''

END


Viewing all articles
Browse latest Browse all 32807

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>