- declare @maxNo integer = 0 select @maxNo = isnull(max(redni_broj), 0) from [dbo].[prenosnica_roba] WHERE id_fakture=3;Set @maxNo=@maxNo+1;
- INSERT into dbo.prenosnica_roba (redni_broj)
- SELECT @maxNo
- FROM dbo.mp_racun_roba
I have reslult
1
1
1
..
Need to have
1
2
3
..
Guest UserPosted Nov 25, 2019, 1:41 AM
Goran BibicPosted Nov 22, 2019, 12:53 AM
pritaeas
Guest UserPosted Nov 20, 2019, 6:31 AM