Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Looking for some help with repeating a specific value. What I need is for [Item ID] to repeat in the table as many times as the sum of CountOrderItemIDs.
This is a very simplistic view of how my data is currently set up:
[Load2]:
load distinct
[Item ID],
[Store-ReviewCategory],
CountOrderItemIDs
resident [Load1];
But this is how I need the data to be coming through:
**This is an example data set. The actual data set has thousands of unique Item IDs with much large CountOrderID sums, so I would need something that can be automated on a large set of data.
As below
temp:
Load ID,Cat,numfield inline [
ID,Cat,numfield
50356,Shirt,2
2321,Pant,4
242342,Shoes,1
234,Hats,4
98789,Purses,5
];
Main:
Load
ID,Cat,numfield
,IterNo() as Rank
Resident temp
while IterNo()<=numfield
;
drop table temp;