I try to print all the data from one field from a table into a file witout any line/field termination character. I would simply like to have all the rows concatenated and printed as one line in the output line. Here how I am doing it:
CREATE TABLE tbl (txt VARCHAR(100));
INSERT INTO tbl VALUES ("text1");
INSERT INTO tbl VALUES ("text2");
INSERT INTO tbl VALUES ("text3");
SELECT txt FROM tbl;
SELECT txt INTO OUTFILE 'test.txt' LINES TERMINATED BY '' FROM tbl;
Unfortunely in the output I get tabs:
text1 text2 text3
if I add
FIELDS TERMINATED BY ''
then all the 100 characters are printed into file (VARCHAR(100)
text1 text2 text3
What should I do to get everything contcatenated as:
text1text2text3
Many thanks in advance!