On Mon, 2003-01-13 at 17:24, Michael Lake wrote: > Hi all, > > This is a bit OT but I am trying to fix up some MySQL data on a Linux > system and having just one problem > Numeric types that have no entry end up as 0.00000 rather than NULL when > imported into the tables.
this is kinda a guess since I distance myself from mysql these days. But, isn't it correct behaviour for mysql to convert the empty string to something that isn't null? You're specifying a value there, not telling it that there is no value. I would assume that it's giving you something that is non-null because you're specifying a value for that column. The default will only apply when that column isn't specified. I think the solution is to run a script beforehand that replaces "" with "\N" or whatever null is in mysql. That or use some zany conditional when you're inserting. HTH James. -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
