Hi all
I have an address db stored in mysql. I have no problems exporting as a csv file but need to export it as fixed width fields with no delimiters etc. Anyone know if theres a way to do this in MySQL?
Thanks
select
rpad(fielda,20," ",
lpad(fieldb,10," "
from mytable
into outfile '/home/me/fixedlengthoutput.txt'
fields terminated by ''
lines terminated by '\n';
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.