Unsupported Screen Size: The viewport size is too small for the theme to render properly.

ODBC Import of double fields

forums forums SQLyog SQLyog: Bugs / Feature Requests ODBC Import of double fields

  • This topic is empty.
Viewing 5 reply threads
  • Author
    Posts
    • #7986
      CraigA
      Member

      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.

    • #14418
      Ritesh
      Member

      Which DB you were importing into MySQL.

      Neway, we will work on it 😀

    • #14419
      CalEvans
      Member

      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=

    • #14420
      Shadow
      Member

      Instead of choosing the copy table option, you could write a script that would do the importing.

    • #14421
      CraigA
      Member

      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.

    • #14422
      Ritesh
      Member

      Bug fixed in SQLyog 3.51

Viewing 5 reply threads
  • You must be logged in to reply to this topic.