forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › ODBC Import of double fields
- This topic is empty.
-
AuthorPosts
-
-
May 30, 2003 at 7:48 pm #7986CraigAMember
Using MySQL 3.23.42, SQLyog 3.11, on NT 4.0 SP6
When you do the import, it defaults to putting (52,0) on double fields, which results in unwanted rounding in the imported data. You can adjust it field by field before starting the import, and then it does not round. The default should be to just copy the double data as is.
-
May 31, 2003 at 4:12 am #14418RiteshMember
Which DB you were importing into MySQL.
Neway, we will work on it 😀
-
May 31, 2003 at 2:38 pm #14419CalEvansMember
Craig,
Quote:The default should be to just copy the double data as is.It does do this. The import feature loads the data you tell it to into the container you give it. If the container cannot hold the data then it has to do something with the extra. In this case it rounds it. This is normal, it is to be expected and it's MySQL doing this part of it anyhow.
It is the responsibility of the developer to make sure that the container is the right size. 52,0 is an arbitrary default chosen by the SQLyog team. There is no setting that they could use that would ensure that it works perfectly every time. The problem here is that the default does not work for you in this particular case.
For this to work the way you want, SQLyog would have to pre-scan your entire input file to make sure that all fields IN ALL ROWS will fit within their allotted space without truncation or rounding. While this might be a cool tool to have it is not the domain of SQLyog. (and I pray to God that it never becomes the default behavior because it could add days to some of my imports!)
Sorry, this is probably not the answer you were looking for.
humbly,
=C=
-
June 2, 2003 at 7:09 am #14420ShadowMember
Instead of choosing the copy table option, you could write a script that would do the importing.
-
June 2, 2003 at 2:17 pm #14421CraigAMember
I'm importing from a thing called ConnX, which is an ODBC front end for the RMS database feature of the OpenVMS operating system. I've used the double fields through it from C++, PHP, and reporting and query tools, and they come through OK, so I don't think this can be blamed on it.
I'm a little confused by the multiple responses….
The point I make is that when creating the output tables, it should make the output table as compatible to the input table as possible by default. So a double field with no restrictions on it would become a double with no restrictions on the output table., etc.
-
June 29, 2003 at 6:23 am #14422RiteshMember
Bug fixed in SQLyog 3.51
-
-
AuthorPosts
- You must be logged in to reply to this topic.