troubleshooting Question

SQL create line numbers for data sampling

Avatar of jdr0606
jdr0606Flag for United States of America asked on
Microsoft SQL Server
11 Comments1 Solution90 ViewsLast Modified:
I have approximately 4700 shipments where I need to grab a sampling based on every 8 the shipment. What I'd like to do is generate a line number when I select the 4700 shipments but start from one after each 8th occurrence.

Line            Shipment #
1            Shipment 1
2            Shipment 2
3            Shipment 3
4            Shipment 4
5            Shipment 5
6            Shipment 6
7            Shipment 7
8            Shipment 8
1            Shipment 9
2            Shipment 10
3            Shipment 11

Kyle Abrahams
Director of Information Technology

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
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 11 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