Importing Data

  • Can someone tell me why numeric fields are coming up as decimal fields when importing tables from one SQL Server 2000 database to another on the same server? I understand that they are functionally the same but am confused as to why this would happen in the first place.

  • Are you using DTS Import? If so, you can specify the transformation and you can check what it's setting as the default datatype.

    Darren


    Darren

  • I also found this in Books Online:

    When using DTS to copy data between SQL Server databases with different code pages and collations, data may be lost or incorrectly translated.

    To avoid translation issues, store international data in Unicode. Once converted to Unicode, you can easily transfer data in any collation or code page without loss or incorrect translation to any Microsoft SQL Server 2000 or Microsoft SQL Server 7.0 database.

    In Microsoft SQL Server 2000, collations are associated with particular code pages and are assigned to individual columns. (Microsoft SQL Server 7.0 uses a single default code page, and does not support column-level collations). If the code page used for a source and destination column match, no data loss will occur in non-Unicode columns. When data is copied between non-Unicode columns, and the source and destination code pages do not match, loss of data can result. In some cases, DTS will perform a best fit mapping, with data loss if the source contains characters that do not occur in the destination code page. In other cases, DTS will perform a copy without any intervening translation, resulting in the loss of any data not represented by the same binary value in both code pages. Following are problems and guidelines for using the Copy SQL Server Objects task and when copying data with the Copy Column transformation using different collations or code pages.

    Darren


    Darren

  • Not sure if this helps or not. SQL only stores decimal data type, numeric is a synonym for decimal. If you create a table with numeric data type sql will change it to decimal.

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply