Changing the Data Type

  • Hi,

    I have a field of FLOAT type. I have to change it to Varchar so that i can concatenate it with other fields.

    I used: alter table

    alter column column_name varchar(255)

    Now when i am trying to concatenate this with oher fields. I am getting error msg:

    "Implicit conversion of varchar value to varchar cannot be performed because the collation of the value is unresolved due to a collation conflict."

    The script was running okay until i changed the db collation to SQL_Latin1_General_CP1_CI_AS

    Any Help!!

    Thanks

  • You're going to have to make sure that whatever you're concatenating it with is the same colation. You can use Convert for that.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Thanks, you were right. Different column had different collation.

    I used alter statement for each of the column and it worked.

    "ALTER TABLE Table_Name ALTER COLUMN Column_Name COLLATE SQL_Latin1_General_CP1_CI_AS"

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

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