From: George L. E. <ab...@ge...> - 2012-01-26 23:05:40
|
I apologize if this is not the correct place to ask about this. I am converting my data to MySQL. I was using mdbtools-0.6_pre2 but had some issues that 0.7~rc1 seemed to resolve, I was able to build it fine, but one of the problems I have come across is stopping me. in the 0.6 version I have a database that mdb-schema reports the Quantity field as: Quantity Double where 0.7 reports it as Quantity Float In 0.6 the value reported by mdb-export is correct, in this example 15. in 0.7 the value is reported as 1.5000000000000000e+01 Is this a bug, or should I just be using 0.6 and working around it's limitations. Thank you for your time. -- George L. Emigh - AB4BD |
From: Jakob E. <jab...@gm...> - 2012-01-27 07:10:49
|
Hi George, this is just a formating issue. The two numbers are just different ways of writing "15". When you insert "1.5000000000000000e+01" into a numeric field in a MySQL database, MySQL will store the value 15. Best regards, Jakob On 26.01.2012, at 23:58, George L. Emigh wrote: > I apologize if this is not the correct place to ask about this. > > I am converting my data to MySQL. > > I was using mdbtools-0.6_pre2 but had some issues that 0.7~rc1 seemed to > resolve, I was able to build it fine, but one of the problems I have come > across is stopping me. > > in the 0.6 version I have a database that mdb-schema reports the Quantity > field as: > Quantity Double > > where 0.7 reports it as > Quantity Float > > In 0.6 the value reported by mdb-export is correct, in this example 15. > in 0.7 the value is reported as 1.5000000000000000e+01 > > Is this a bug, or should I just be using 0.6 and working around it's > limitations. > > Thank you for your time. > > -- > George L. Emigh - AB4BD > > > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > mdbtools-dev mailing list > mdb...@li... > https://lists.sourceforge.net/lists/listinfo/mdbtools-dev |
From: George L. E. <ab...@ge...> - 2012-01-27 19:33:26
|
Thank you, it kinda freaked me out a bit, ran into another problem, wanted to add a prefix to the table names using the -N <namespace> option. for -N qp mdb-schema gives: DROP TABLE [qp_Customer Table]; CREATE TABLE [qp_Customer Table] which is what I expected, but mdb-export -I mysql -N qp gives: INSERT INTO qp`Customer Table` ( Namespaces is not mentioned in the man pages but is when you run the command without any options, is Namespaces going to be removed? Also I see the sanitize option is gone, will that option to convert spaces to underscores be coming back? I liked the feature, convert all fields and table names to lowercase would be nice too, but for now I'll just alter my tables after the conversion. Thank you so very much for the work you have done making this cool tool. George Jakob Egger wrote: > Hi George, > > this is just a formating issue. The two numbers are just different ways of > writing "15". When you insert "1.5000000000000000e+01" into a numeric > field in a MySQL database, MySQL will store the value 15. > > Best regards, > Jakob > > On 26.01.2012, at 23:58, George L. Emigh wrote: > >> I apologize if this is not the correct place to ask about this. >> >> I am converting my data to MySQL. >> >> I was using mdbtools-0.6_pre2 but had some issues that 0.7~rc1 seemed to >> resolve, I was able to build it fine, but one of the problems I have come >> across is stopping me. >> >> in the 0.6 version I have a database that mdb-schema reports the Quantity >> field as: >> Quantity Double >> >> where 0.7 reports it as >> Quantity Float >> >> In 0.6 the value reported by mdb-export is correct, in this example 15. >> in 0.7 the value is reported as 1.5000000000000000e+01 >> >> Is this a bug, or should I just be using 0.6 and working around it's >> limitations. >> >> Thank you for your time. >> >> -- >> George L. Emigh - AB4BD >> >> >> >> >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d >> _______________________________________________ >> mdbtools-dev mailing list >> mdb...@li... >> https://lists.sourceforge.net/lists/listinfo/mdbtools-dev > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 -- George L. Emigh - AB4BD |
From: Nirgal <con...@ni...> - 2012-01-30 10:59:19
|
On Friday 27 January 2012 19:32:58 George L. Emigh wrote: > (...) ran into another problem, wanted > to add a prefix to the table names using the -N <namespace> option. > > for -N qp mdb-schema gives: > DROP TABLE [qp_Customer Table]; > CREATE TABLE [qp_Customer Table] > > which is what I expected, but mdb-export -I mysql -N qp gives: > INSERT INTO qp`Customer Table` ( > > Namespaces is not mentioned in the man pages but is when you run the command > without any options, is Namespaces going to be removed? Ops. My mistake. I just comited a fix regarding namespaces: $ src/util/mdb-export -I mysql ~/Desktop/uuid.mdb table1I INSERT INTO `table1` (`test2`, `test`) VALUES ("OK",NULL); INSERT INTO `table1` (`test2`, `test`) VALUES ("OK",NULL); $ src/util/mdb-export -I mysql -N qp ~/Desktop/uuid.mdb table1I INSERT INTO `qp_table1` (`test2`, `test`) VALUES ("OK",NULL); INSERT INTO `qp_table1` (`test2`, `test`) VALUES ("OK",NULL); $ src/util/mdb-export -I postgres ~/Desktop/uuid.mdb table1 INSERT INTO "table1" ("test2", "test") VALUES ("OK",NULL); INSERT INTO "table1" ("test2", "test") VALUES ("OK",NULL); $ src/util/mdb-export -I postgres -N qp ~/Desktop/uuid.mdb table1 INSERT INTO "qp"."table1" ("test2", "test") VALUES ("OK",NULL); INSERT INTO "qp"."table1" ("test2", "test") VALUES ("OK",NULL); Patch is available at: https://github.com/brianb/mdbtools/commit/7e34078bcc9a7b23ab028db969cdf77c0b283752 > Also I see the sanitize option is gone, will that option to convert spaces > to underscores be coming back? I liked the feature, convert all fields and > table names to lowercase would be nice too, but for now I'll just alter my > tables after the conversion. I don't plan to work on sanitizing again (but maybe someone else will). Non-ascii tables results in duplicate names. For exemple, chinese names will create tables "___" "___". One need to add something to diferentiate them, such as a number: "___1" "___2". Then you need to store new names for handling foreign contraints, and so on. Not trivial at all. With the proper escape now working, I don't see the point. Removing spaces from table names after mysql conversion seems a bit out of scope, in my opinion. Cheers |
From: George L. E. <ab...@ge...> - 2012-01-30 22:54:24
|
Nirgal wrote: > On Friday 27 January 2012 19:32:58 George L. Emigh wrote: >> (...) ran into another problem, wanted >> to add a prefix to the table names using the -N <namespace> option. >> >> for -N qp mdb-schema gives: >> DROP TABLE [qp_Customer Table]; >> CREATE TABLE [qp_Customer Table] >> >> which is what I expected, but mdb-export -I mysql -N qp gives: >> INSERT INTO qp`Customer Table` ( >> >> Namespaces is not mentioned in the man pages but is when you run the >> command without any options, is Namespaces going to be removed? > > Ops. My mistake. I just comited a fix regarding namespaces: > > $ src/util/mdb-export -I mysql ~/Desktop/uuid.mdb table1I > INSERT INTO `table1` (`test2`, `test`) VALUES ("OK",NULL); > INSERT INTO `table1` (`test2`, `test`) VALUES ("OK",NULL); > > $ src/util/mdb-export -I mysql -N qp ~/Desktop/uuid.mdb table1I > INSERT INTO `qp_table1` (`test2`, `test`) VALUES ("OK",NULL); > INSERT INTO `qp_table1` (`test2`, `test`) VALUES ("OK",NULL); > > $ src/util/mdb-export -I postgres ~/Desktop/uuid.mdb table1 > INSERT INTO "table1" ("test2", "test") VALUES ("OK",NULL); > INSERT INTO "table1" ("test2", "test") VALUES ("OK",NULL); > > $ src/util/mdb-export -I postgres -N qp ~/Desktop/uuid.mdb table1 > INSERT INTO "qp"."table1" ("test2", "test") VALUES ("OK",NULL); > INSERT INTO "qp"."table1" ("test2", "test") VALUES ("OK",NULL); > > Patch is available at: > https://github.com/brianb/mdbtools/commit/7e34078bcc9a7b23ab028db969cdf77c0b283752 Excellent, thanks. > >> Also I see the sanitize option is gone, will that option to convert >> spaces >> to underscores be coming back? I liked the feature, convert all fields >> and table names to lowercase would be nice too, but for now I'll just >> alter my tables after the conversion. > > I don't plan to work on sanitizing again (but maybe someone else will). > Non-ascii tables results in duplicate names. For exemple, chinese names > will create tables "___" "___". One need to add something to diferentiate > them, such as a number: "___1" "___2". Then you need to store new names > for handling foreign contraints, and so on. Not trivial at all. > With the proper escape now working, I don't see the point. > Removing spaces from table names after mysql conversion seems a bit out of > scope, in my opinion. That part was not and should never actually a big problem, I am an old guy who dislikes spaces in things like table and field names and prefer them lower case as well, so it was just an issue of preference, and I changed everything to my liking with a little php scripting and I'm moving forward on my project. So it's obviously not necessary to have those things part of mdbtools. Thanks again for a fantastic tool. > > Cheers > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 -- George L. Emigh - AB4BD |