Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2007
    Location
    Orlando,FL
    Posts
    35

    Unanswered: Collation Conflict (DHL)

    Moving code from Sybase to SQL Server 2005. I have two tables. One table (vINID) is reset and populated right before this code runs. The other table (vINPA) is a table in the database used by the Front End App. This is the error I get when I try and run on our SQL Server 2005.

    Msg 468, Level 16, State 9, Line 1
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_BIN" in the equal to operation.

    Here is the SQL code:

    SELECT DISTINCT
    vINID.BLEI_CK,
    vINID.BLIV_ID,
    ISNULL(vINPA.RCPT_AMT,0) AS RCPT_AMT

    FROM Reporting_DEV.dbo.RPT_04597_INID AS vINID -- table re-populated

    LEFT JOIN fauafpr0_pids.dbo.CDS_INPA_PMT_ACT AS vINPA
    ON vINPA.BLIV_ID = vINID.BLIV_ID

    WHERE vINID.BLIV_ID = '071600007594'

    Thank you for your help.
    David

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Ideally, you would change the collation on the oddball table. Was there a reason to make one of these tables with a collation different from the database default collation?

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Just noticed one of the tables is actually on a remote server. Try this:
    Code:
    SELECT DISTINCT
      vINID.BLEI_CK,
      vINID.BLIV_ID,
      ISNULL(vINPA.RCPT_AMT,0) AS RCPT_AMT
    FROM Reporting_DEV.dbo.RPT_04597_INID AS vINID -- table re-populated
      LEFT JOIN fauafpr0_pids.dbo.CDS_INPA_PMT_ACT AS vINPA
        ON vINPA.BLIV_ID = vINID.BLIV_ID COLLATE database_default
    WHERE vINID.BLIV_ID = '071600007594'

  4. #4
    Join Date
    Jul 2007
    Location
    Orlando,FL
    Posts
    35
    Code fix works. Thank you. Not sure what "Collation" is or how to change it or what the database default collations is? New to SQL Server 2005.

Posting Permissions

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