Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    4

    Unanswered: changing data types

    hi!

    I'd like to change the datatype of one tablefield from varchar to text.
    Is this possible when the table already is populated, or will there be trouble?

    obscurr

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524

    Re: changing data types

    Depending the version you're using.

    In any way

    Code:
    exec sp_rename MyTable, MyOldTable
    select Col1, Col2, convert(TEXT, ColVarchar) ColVarchar
    into MyTable
    from MyOldTable
    drop table MyOldTable

  3. #3
    Join Date
    Dec 2003
    Posts
    4
    I'm using SQL Server version 7.0

Posting Permissions

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