TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Goran Bibic
481
2.9k
197.6k
Counter in SQL from C#
Nov 20 2019 4:32 AM
I try this
<pre>
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
..
Reply
Answers (
5
)
Select from item table where id from list
Working with SQL cursor