Discussion:
[mdb-dev] double changed to float from older version of mdbtools
George L. Emigh
2012-01-26 22:58:04 UTC
Permalink
Jakob Egger
2012-01-27 07:10:39 UTC
Permalink
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
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
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
https://lists.sourceforge.net/lists/listinfo/mdbtools-dev
George L. Emigh
2012-01-27 19:32:58 UTC
Permalink
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
Post by Jakob Egger
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
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
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
------------------------------------------------------------------------------
Post by Jakob Egger
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
https://lists.sourceforge.net/lists/listinfo/mdbtools-dev
Nirgal
2012-01-30 10:59:01 UTC
Permalink
(...) ran into another problem, wanted
to add a prefix to the table names using the -N <namespace> option.
DROP TABLE [qp_Customer Table];
CREATE TABLE [qp_Customer Table]
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
George L. Emigh
2012-01-30 22:54:00 UTC
Permalink
Post by Nirgal
(...) ran into another problem, wanted
to add a prefix to the table names using the -N <namespace> option.
DROP TABLE [qp_Customer Table];
CREATE TABLE [qp_Customer Table]
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?
$ 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);
https://github.com/brianb/mdbtools/commit/7e34078bcc9a7b23ab028db969cdf77c0b283752

Excellent, thanks.
Post by Nirgal
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.
Post by Nirgal
Cheers
Loading...