Wednesday, December 21, 2011

Dynamics GP Extended Pricing Error

 

Few weeks back I have posted about this error which was repeated again yesterday with one of my customers:

Microsoft SQL Native Client SQL Server Cannot insert the value NULL into column ‘SEQNUMBR’, table dbo.IV10400, column does not allow nulls. UPDATE fails.

image_thumb

In my previous article I have explained everything about the issue and how it occur, this time I have decided to write a script that re-index the IV10400 table as below:


DECLARE @COUNTER INT
SET @COUNTER = 30
DECLARE CURR CURSOR FOR SELECT SEQNUMBR FROM IV10400
DECLARE @SEQNUMBR BIGINT
OPEN CURR
FETCH NEXT FROM CURR INTO @SEQNUMBR
WHILE @@FETCH_STATUS = 0
BEGIN
UPDATE IV10400 SET SEQNUMBR = @COUNTER WHERE SEQNUMBR = @SEQNUMBR
SET @COUNTER = @COUNTER + 30
FETCH NEXT FROM CURR INTO @SEQNUMBR
END
CLOSE CURR
DEALLOCATE CURR



Enjoy!





Regards,
--
Mohammad R. Daoud MVP - MCT
MCP, MCBMSP, MCTS, MCBMSS
+962 - 79 - 999 65 85
me@mohdaoud.com
www.mohdaoud.com

No comments:

Related Posts:

Related Posts with Thumbnails