Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
micheledenardi
Specialist II
Specialist II

Concat blocks of X records

Dear All,

is there a way to concat "packs" of 1000 values?

I'm looking for a very fast solution, without using "for" statement. 

Example, this is my original table:

Field1
1
2
3
...
...
...
2789

 

i would like to obtain

Field
1,2,3,......,1000
1001,1002,.....2000
2001,2002,...,2789

 

 

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
1 Solution

Accepted Solutions
micheledenardi
Specialist II
Specialist II
Author

Found the solution by myself:

EXAMPLE:
Load
    Concat(Field1,',') as Field1
    Group by PackSize;
LOAD Distinct
    Ceil(RecNo(),1000) as PackSize,
    Field1
FROM EXAMPLE.qvd (qvd);

 

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

1 Reply
micheledenardi
Specialist II
Specialist II
Author

Found the solution by myself:

EXAMPLE:
Load
    Concat(Field1,',') as Field1
    Group by PackSize;
LOAD Distinct
    Ceil(RecNo(),1000) as PackSize,
    Field1
FROM EXAMPLE.qvd (qvd);

 

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.