Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005

    Unanswered: Datatype Conversion Problem.

    Hi ALL!

    I have a table named 'Table1' which contains a column 'Name'.
    The data type of column [Name] is varchar(50).

    When i try to change its datatype to binary by trying following code

    ALTER TABLE Table1 Alter Column [Name] Binary(5000)

    It gives following error.

    " Creation of table 'bp_MAIN' failed because the row size would be 10021, including internal overhead. This exceeds the maximum allowable table row size, 8060. "

    So, how can i change the datatype of this column ?

    Shabber Abbas.

  2. #2
    Join Date
    Jun 2003

    Thumbs up

    U cannot convert varchar column to binary column explicitly.
    One solution is ,create a new table (lets say t1) with binary datatype.
    Then convert and insert record into t1 table from ur original table.
    Drop original table and rename new table to original table.
    set same permission as orginal table.

    insert into t1(othercolumnnames,name) select othercolumnnames,convert(binary(5000),name) as name from Table1
    I love cursor,though I never use it.Cos' I dont want to misuse it.


Posting Permissions

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