Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2006
    Posts
    17

    Angry Unanswered: Help--A error about collation conflict

    Code:
    UPDATE  #TMPC
    SET  EsaItem = ItemClass
    FROM  #TMPC A,
     dbo.EisAdj_ItemClass_V B
    WHERE  A.EsaItem = B.ItemClassCODE
    This code is part of my procedure. I always get error--Server: Msg 446, Level 16, State 9, Procedure GetAdjDataFromShipment, Line 282
    Cannot resolve collation conflict for equal to operation.
    when program execute at this section.
    I try to add this statement "COLLATE SQL_Latin1_General_CP1_CI_AS", but it seems not working. I do not know why!

  2. #2
    Join Date
    Jun 2003
    Posts
    269

    Question

    Do explicit collation conversion prior to joining
    Code:
    --example--
    create table #a (char_set1 varchar(50) collate Latin1_General_CI_AS)
    create table #b(char_set2 varchar(50)collate Latin1_General_BIN)
    insert into #a values ('collate')
    insert into #b values ('collate')
     
    ---this will throw error-
    select * from #a join #b on char_set1 = char_set2
     
    --explicit collation conversion prior to joining
     
    select * from #a join #b on char_set1 = char_set2 collate Latin1_general_CI_AS
    .
    Why dont u post the DDL of table with collation?
    I love cursor,though I never use it.Cos' I dont want to misuse it.
    ----------------------------------------------

    ----cheers
    ----http://mallier.blogspot.com

  3. #3
    Join Date
    Feb 2006
    Posts
    17
    I have tried to add the collation into DDL of table, but I still got the same error. I don't know why.
    Is there other things which would cause this error?

  4. #4
    Join Date
    Jun 2003
    Posts
    269
    Quote Originally Posted by yunkun_yang
    I have tried to add the collation into DDL of table, but I still got the same error. I don't know why.
    Is there other things which would cause this error?
    post ur table structure in this forum.
    I love cursor,though I never use it.Cos' I dont want to misuse it.
    ----------------------------------------------

    ----cheers
    ----http://mallier.blogspot.com

Posting Permissions

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