Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, I should solve this problem.
Given a data set as follows:
ARTICLE | MODEL | PRICE | Q.TY |
XX | RED | 10,00 | 3 |
ZZ | GREEN | 12,00 | 2 |
YY | YELLOW | 11,00 | 1 |
I want to get a table showing the association Article / model / price many times as the quantity, ie:
ARTICLE | MODEL | PRICE |
XX | RED | 10,00 |
XX | RED | 10,00 |
XX | RED | 10,00 |
ZZ | GREEN | 12,00 |
ZZ | GREEN | 12,00 |
YY | YELLOW | 11,00 |
Can anyone helpme?
Thanks all.
hei
try this script:
TestTemp:
LOAD * INLINE [
ARTICLE, MODEL, PRICE, QTY
XX, RED, 10, 3
ZZ, GREEN, 12, 2
YY, YELLOW, 11, 1
];
Data:
load ARTICLE,
MODEL,
PRICE,
rowno() as RowNum
resident TestTemp
while IterNo()<=QTY;
drop table TestTemp;
hei
try this script:
TestTemp:
LOAD * INLINE [
ARTICLE, MODEL, PRICE, QTY
XX, RED, 10, 3
ZZ, GREEN, 12, 2
YY, YELLOW, 11, 1
];
Data:
load ARTICLE,
MODEL,
PRICE,
rowno() as RowNum
resident TestTemp
while IterNo()<=QTY;
drop table TestTemp;
Thank you very much!