Quote:
|
Originally Posted by r937
ORDER BY special_condition_for_header
|
Just tried that didnt work,mysql doesnt seem to recognise 'special_condition_for header'.
Anyways i found a way out.
To add a header to the outfile the best way to do this and ensuring that its at the top is to use a UNION statement.
e.g.
SELECT 'MATERIAL_NBR', 'MATERIAL_TYPE'
UNION
SELECT MATERIAL_NBR, MATERIAL_TYPE INTO OUTFILE 'C:\TEST\TEST.TXT'
FIELDS TERMINATED BY '|'
LINES TERMINATED BY '\n\r' FROM TABLE MATERIALS;
Works like a charm.
Thanks for your help..