Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Location
    Florida
    Posts
    3

    Unanswered: Default Data Types in SQl Server

    Is there a way to change the default data type in SQL Server? If I import a database into SQL Server it makes every non-numeric field a nvarchar field. Is there a way to change this so that these fields would be varchar or char by default? I cannot find any way to redo these as a batch/group update and have to modify every single field manually. Any insights greatly appreciated.

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by TomF
    If I import a database into SQL Server it makes every non-numeric field a nvarchar field.
    What method are you using to import the database?

    Regards,

    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    And what is your datasource? Are you talking about importing delimited text files to tables?
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Dec 2003
    Location
    Florida
    Posts
    3

    Default Data Types in SQl Server

    I use the DTS wizard (ad-hoc, not a scheduled job). I usually import MS-Access tables, but have the same problem with Sybase tables or flat files - every non-numeric field is created as nvarchar. I thought the model database might be the place to override/change this behavior, but no luck there either. Thanks.

  5. #5
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by TomF
    I use the DTS wizard (ad-hoc, not a scheduled job). I usually import MS-Access tables, but have the same problem with Sybase tables or flat files - every non-numeric field is created as nvarchar. I thought the model database might be the place to override/change this behavior, but no luck there either. Thanks.
    You will probably have to define the destination data types in the data pump destination tab. If you are importing to a new table, click on the "create" tab and a sample create table script will appear. Edit the destination columns to be of the desired data type.

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •