MIDRANGE dot COM Mailing List Archive

Home » MIDRANGE-L » December 2013

Re: SQL output to csv


On Thu, Dec 5, 2013 at 7:05 AM, <rob@xxxxxxxxx> wrote:
Looks nice. So, how does [Python] handle these column types:
I ran into some of these just last week trying to use iNav's Export.
I suppose you have to CAST, like I did when I used the export, right?

I would think so. I haven't used those types myself. I'm not sure
you would want to put any of those into a CSV in the first place; but
if you had to, CASTing is probably the most sane.

Ultimately, Python's CSV module tries to convert everything to string
(using Python's built-in str() function) just before writing, and if
that conversion fails, then of course the write fails. So arbitrary
binary data may need to be uuencoded or similar.


Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact