Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
this might not be too difficult but I cannot find out how to do this.
In a load-statement I want to just load the first record where the values "OrderNo" AND "Pos" are distinct.
Example:
OrderNo, Pos, pc, val
123,3,5,10
123,3,6,15
should only load the first record.
Thank you in advace for any hint.
try like this:
Temp:
Load * Inline [
OrderNo, Pos, pc, val
123,3,5,10
123,3,6,15
234,4,5,20
234,6,4,23
345,2,3,44
];
NoConcatenate
table1:
LOAD * Resident Temp
Where OrderNo<>Previous(OrderNo) and Pos<>Previous(Pos)
Order By OrderNo, Pos, pc, val;
DROP Table Temp;
try like this:
Temp:
Load * Inline [
OrderNo, Pos, pc, val
123,3,5,10
123,3,6,15
234,4,5,20
234,6,4,23
345,2,3,44
];
NoConcatenate
table1:
LOAD * Resident Temp
Where OrderNo<>Previous(OrderNo) and Pos<>Previous(Pos)
Order By OrderNo, Pos, pc, val;
DROP Table Temp;