Collation Confilict

  • Would anyone know why I would get a collation conflict on a temble table??

    Below is my example.  If I add COLLATE Latin1_General_BIN to the end of my column everything works fine.  I just don't understand how a temp table collation can differ from the database default

     

     

    CREATE PROCEDURE s_hom_collation_example

    AS

     DECLARE @table_temp TABLE

      (

       item_number  VARCHAR(100) COLLATE Latin1_General_BIN

     &nbsp

     /*******************************************************************************************************/

     INSERT

      @table_temp

     SELECT

      TOP 10

      item_number

     FROM

      AAD.dbo.t_item_master

     /*******************************************************************************************************/

     SELECT

      TT.item_number

     FROM

      @table_temp TT

    -- On ARIES, we get a collation conflict if the following two lines are uncommented

      INNER JOIN AAD.dbo.t_item_master ITM

       ON ITM.item_number = TT.item_number

    GO

  • Most likely the default collation of the AAD database differs from the server default.  The choices are to use the collate statement as you described, or change the collation of the AAD database (and the objects belonging to the database).

    Just had the same issue a week or so ago.  In my case the database was my own "DBA" database, so I changed its collation.

    Steve

  • I know to check/change the database default.  How do you look at the server default?

  • Its on the general tab of the server properties dialog, just above autostart properties.

    (Right click on the server name, and select properties)

    Steve

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

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