Error in Query

  • Hi,

    it gives me this Error

    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AI" in the EXCEPT operation.

    In This Query Bold Line

    Declare @v_Temp_School Table (School Varchar (250) , Currency Varchar (20) )

    Insert Into @v_Temp_School (School )

    --insert into #Temp_MDL (school,currency)

    select ueb.evs_name from evs_unitExtensionbase ueb

    except

    select distinct school from #Temp_MDL --collate SQL_Latin1_General_CP1_CI_AS

    Select * From @v_Temp_School

    Insert Into #Temp_MDL ( School , Currency )

    Select School , '$' From @v_Temp_School

    Please Help me Out

    Thanks For the Help

    immad

  • Seems like a collation conflict. What happens if you specify the collation of the table variable?

    Ex:

    Declare @v_Temp_School Table (School Varchar (250) SQL_Latin1_General_CP1_CI_AS, Currency Varchar (20) SQL_Latin1_General_CP1_CI_AS)

    Insert Into @v_Temp_School (School )

    --insert into #Temp_MDL (school,currency)

    select ueb.evs_name from evs_unitExtensionbase ueb

    except

    select distinct school from #Temp_MDL --collate SQL_Latin1_General_CP1_CI_AS

    Select * From @v_Temp_School

    Insert Into #Temp_MDL ( School , Currency )

    Select School , '$' From @v_Temp_School

    Joie Andrew
    "Since 1982"

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

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