troubleshooting Question

Best way to generate order numbers

Avatar of moruda
moruda asked on
Microsoft SQL Server
3 Comments1 Solution922 ViewsLast Modified:
We need a good method to generate order numbers...Currently we are using a table with 1 value for next order number...The proc that generates the order number now, gets that number and increments it by one. We are running into a problem (rarely), but it is happening, where an order number becomes duplicated. How can we ensure that the system can generate hundreds or thousands of order numbers simultaneously without duplicating them, while still using our method of Next order number = Last Order number +X?

Thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros