Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
If I load from multiple text files and then store that table into one text file, can I choose the sort order of the new txt file?
TEST_TABLE"
LOAD
Field 1,
Field 2,
Field 3
FROM [Path.txt]
(txt, codepage is 1252, embedded labels, delimiter is '~', msq);
STORE 'TEST_TABLE' into [TEST_TABLE.txt] (txt, codepage is 1252, embedded labels, delimiter is '~', msq);
In my TEST_TABLE.txt file I want to sort by Field 3 alphabetically for instance.
TEMP_TEST_TABLE:
LOAD
[Field 1],
[Field 2],
[Field 3]
FROM [Path.txt]
(txt, codepage is 1252, embedded labels, delimiter is '~', msq);
TEST_TABLE:
NOCONCATENATE
LOAD * RESIDENT TEMP_TEST_TABLE ORDER BY [Field 3];
STORE 'TEST_TABLE' into [TEST_TABLE.txt] (txt, codepage is 1252, embedded labels, delimiter is '~', msq);
Hi,
what about loading temporary table with ORDER BY Field 3 before using STORE statement?
TEMP_TEST_TABLE:
LOAD
[Field 1],
[Field 2],
[Field 3]
FROM [Path.txt]
(txt, codepage is 1252, embedded labels, delimiter is '~', msq);
TEST_TABLE:
NOCONCATENATE
LOAD * RESIDENT TEMP_TEST_TABLE ORDER BY [Field 3];
STORE 'TEST_TABLE' into [TEST_TABLE.txt] (txt, codepage is 1252, embedded labels, delimiter is '~', msq);