Ok my query gives me these results.
BatchID | Batch_Item_Count
-------------------------------------------
1514021901 | 12
I need results to look like this
BatchID I Batch_Item_Count
------------------------------------------
1514021901 | 0001514021901 I 0011514021901 I 0021514021901 | 0031514021901 | 0041514021901 | 0051514021901 | 0061514021901 | 007 1514021901 | 0081514021901 | 0091514021901 | 0101514021901 | 011
I hope this is a OK example.
I trying to duplicate a row that in table for a batch that was created the batch has 12 items in it. I need to label these 12 items. So I need the BatchID to stay the same and for the row to be duplicated 12 times and format the batch_Item_Count like this 000 through to 011. The max amount of items that can be batches in 999. I need this to work for any amount of items in a batch from 1 to 999.