This thread helped me but the above could be reduced to:
DECLARE @lastc int;
SELECT @lastc = ISNULL(MAX(CCGLId), 0) FROM CGL;
DBCC CHECKIDENT ('CGL', RESEED, @lastc);
- This reply was modified 5 years, 5 months ago by s.wileman. Reason: Code formatting