Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 9917mark
		
			9917mark
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Evening,
I have a requirement to allocate a sequence number to my data from 1 to 7.
This must then repeat from 1 to 7 until the table has finished loading.
Table consists of a list of SKU's totaling 87000
The Idea is to use the sequence number to filter the data for easier analysis.
And then export each sequence number to an excel spreadsheet for import.
Sample Raw Data:
| sku | 
| 1000000 | 
| 1000001 | 
| 1000003 | 
| 1000004 | 
| 1000005 | 
| 1000006 | 
| 1000007 | 
| 1000008 | 
| 1000009 | 
| 1000010 | 
| 1000011 | 
| 1000012 | 
| 1000014 | 
| 1000015 | 
| 1000016 | 
Desired Result:
| sku | Seq | 
| 1000000 | 1 | 
| 1000001 | 2 | 
| 1000003 | 3 | 
| 1000004 | 4 | 
| 1000005 | 5 | 
| 1000006 | 6 | 
| 1000007 | 7 | 
| 1000008 | 1 | 
| 1000009 | 2 | 
| 1000010 | 3 | 
| 1000011 | 4 | 
| 1000012 | 5 | 
| 1000014 | 6 | 
| 1000015 | 7 | 
| 1000016 | 1 | 
Thank you in advance.
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		LOAD sku,
     Mod(RowNo()-1,7)+1 as Seq
From YourSourcehope this helps
Marco
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		LOAD sku,
     Mod(RowNo()-1,7)+1 as Seq
From YourSourcehope this helps
Marco
 
					
				
		
 9917mark
		
			9917mark
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		@MarcoWedel Thank you for you prompt response. Works perfectly
