Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mschreiber
Contributor III
Contributor III

STORE INTO on a sorted resident table exports unsorted

Hello,

for data conversion I have to export data sorted to a txt-file.

Auftragspos:
LOAD
  Angebotsnr,
  POSITIONSNR as Position,
RESIDENT Auftragspos_tmp ORDER BY Angebotsnr,POSITIONSNR;


Auftragspos2:
NOCONCATENATE LOAD
    Angebotsnr,
    Position,
RESIDENT Auftragspos;

STORE Angebotsnr,Position FROM Auftragspos2 INTO $(varOutputPath)Auftragspos.txt (ansi, delimiter is '|');

DROP TABLE Auftragspos

The table viewer show sorted table Auftragspos2 correctly.

Then I stored this internal table into an external text-file "Auftragspos.txt". When I opening the text-file the lines are not sorted.

Anyone an idea how I can force a sorted export ?

1 Solution

Accepted Solutions
Not applicable

Hi,

Try the Order By the second table Resident.

By Rebeca

View solution in original post

2 Replies
Not applicable

Hi,

Try the Order By the second table Resident.

By Rebeca

mschreiber
Contributor III
Contributor III
Author

Hi Rebeca,

I tried the order by on the second table resident "Auftragspos2". This solves the problem - thanks

Bye

Mathias