Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a Qvd like this which has several millions of rows:
MyTable :
LOAD
TextField1,
TextField2,
....
FROM [lib://MyTable.qvd]
(qvd);
And I'd like to divide it into smaller Qvds by row Number, to get QVds of maximum 1 million of rows.
I'm trying to do it applying a where clause with a Rowno() function with minimum and maximum values, but it's not working.
Anybody has a clue about how to do this?
Best regards, Marcel.
Maye be :
Data:
LOAD DIV(rowno(),1000000) as IndexQvd,
Field1,
Field2
FROM
.\MyTable.qvd
(qvd);
ValueList:
load distinct IndexQvd as Valuelist resident Data;
NumRows=NoOfRows('ValueList');
FOR i=0 to $(NumRows)-1
LET vBox=Peek('Valuelist',$(i));
Data$(i):
noconcatenate
LOAD * resident Data where IndexQvd='$(i)';
store Data$(i) into Data$(i).qvd (qvd);
drop table Data$(i);
NEXT
drop table Data,ValueList;
Maye be :
Data:
LOAD DIV(rowno(),1000000) as IndexQvd,
Field1,
Field2
FROM
.\MyTable.qvd
(qvd);
ValueList:
load distinct IndexQvd as Valuelist resident Data;
NumRows=NoOfRows('ValueList');
FOR i=0 to $(NumRows)-1
LET vBox=Peek('Valuelist',$(i));
Data$(i):
noconcatenate
LOAD * resident Data where IndexQvd='$(i)';
store Data$(i) into Data$(i).qvd (qvd);
drop table Data$(i);
NEXT
drop table Data,ValueList;
Thank you @Taoufiq_Zarra !