SP Issue in SQL 2008

  • Hi,

    When i ran the store procedure in sql 2008. its getting the following error

    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the is operation

    Let's say example,

    insert into db1.dbo.tab1 (col1,col2,col3) values (select col1,col2,col3 from tab1 where col1

    not in(select col1 from tab1 where col1 is not null)

    This is the query, which i had executed seperately. Its works fine. when i run the SP.. the above error occurred.

    I would appreciate, if any body gives the solution..

    Thanks & Regards

    Balaji.G

  • make use of COLLATE before your "IN"...

    COLLATE Latin1_General_CI_AS

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Hi Henri,

    Shall i use in this way..

    insert into db1.dbo.tab1 (col1,col2,col3) values (select col1,col2,col3 from tab1 where col1

    COLLATE Latin1_General_CI_AS

    not in(select col1 from tab1 where col1 is not null)

    Is it Correct or not?..

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

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