You could do this with a trigger except you are not allowed to create a trigger on a temporary table. For a temporary table, you will need an update statement after the insert, like
create table #groupsseq
(
groupseq nvarchar(20),
SeqManual int,
status nvarchar(100)
)
insert into #groupsseq(groupseq,SeqManual)
values
('A',1),
('A',2),
('A',4),
('A',5),
('B',1),
('B',2),
('B',3),
('B',4);
;With cte As
(Select groupseq, SeqManual, status,
Case When Min(SeqManual) Over(Partition By groupseq) <> 1
Or Max(SeqManual) Over(Partition By groupseq) - Min(SeqManual) Over(Partition By groupseq) <> Count(SeqManual) Over(Partition By groupseq) - 1
Then 'Wrong Sequence' Else 'success' End As NewStatus
From #groupsseq)
Update cte
Set status = NewStatus;
Select * From #groupsseq Order By groupseq, SeqManual;
Tom