View Single Post

   
  #6 (permalink)  
Old 02-28-2008, 09:34 AM
Logos
 
Posts: n/a
Default Re: non-tab delimited output?


> Post an example of the output you want.


All fields are varchars, and are space padded on insert to fill them
out to the maximum for each field.
(eg) col1 = VARCHAR(10), col2 = VARCHAR(6)
(eg) INSERT INTO sample VALUES('1234567 ',' 456');

When I export, what I would like to see is

1234567 456

This is because the legacy app (called filePro) allocates a fixed
number of bytes per record, and then a fixed number of bytes per field;
it then pads with spaces as necessary for each field in a flat file.

I actually solved this by simply redefining the schema in filePro as
having a 1 byte field between every field to accommodate the tabs, but
this is both inelegant and a pain in the ass to define So I'd be
interested in a good solution on mysql's side.

Concat looks like it would work, but how CPU-intensive is it? I would
like an efficient solution if at all possible...tho I doubt there is
one, as I saw that the ability to define field delimiters was on the
wish list

Tyler

Reply With Quote