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
Nirmal KumarC
1.4k
327
79.1k
How to dynamic increment Batch ID in sql server with cursor
Sep 18 2014 10:28 AM
I want How to weekly wise one time all batches as Batch id dynamic increment using Sql server with cursor example below.
Batches Example:
Batches:
PSF/180
ERS/B366
ARPA/B146
EFA/B989
PSSR/B1096
RECP/B175
CHEMCO/B73
ERS/B367
So this All Batch id Dynamically get this result in below
I want
ARPA/B146
get data to database
After Split the
ARPA/B
separate
146
146 Value Dynamic Increment 147
after this value
ARPA/B147
insert Batchid
to database
this result
another one Example:
PSSR/B1096
this id dynamically create
PSSR/B1097
Thanks
Reply
Answers (
2
)
How to Split String in sqlserver?
How many Unique & Primary Key's in a table