help with view

  • SELECT Customers.dbo.Lead.Last_Evaluation_Product__c

    FROM Customers.dbo.Product INNER JOIN

    Customers.dbo.Lead ON Customers.dbo.Lead.Last_Evaluation_Product__c = Customers.dbo.Product.Name

    WHERE (Customers.dbo.Lead.IsConverted = 0) AND (Customers.dbo.Lead.IsDeleted = 0)code]

    I can't seem to get this view to execute correctly. I get an error saying cannot resolve collation conflict for equal to operation.

    I'm trying to join a Lead table with a Product table based off of the Lead Table field called Last Evaluation Product.

    When the end user is filling in the information they see a magnifying glass. When they click on the magnifying glass they can lookup the product they want to insert into the "Last Evaluation Product" field.

    Any help would be greatly appreciated

  • ON Customers.dbo.Lead.Last_Evaluation_Product__c = Customers.dbo.Product.Name -- the culprit.

    Please resolve collation conflict with COLLATE clause.

    COLLATE (Transact-SQL)

    http://msdn.microsoft.com/en-us/library/ms184391.aspx

  • try explicitly identifying a collation for the join criteria, like this:

    SELECT Customers.dbo.Lead.Last_Evaluation_Product__c

    FROM Customers.dbo.Product

    INNER JOIN

    Customers.dbo.Lead

    ON Customers.dbo.Lead.Last_Evaluation_Product__c COLLATE SQL_Latin1_General_CP1_CI_AS

    = Customers.dbo.Product.Name COLLATE SQL_Latin1_General_CP1_CI_AS

    WHERE (Customers.dbo.Lead.IsConverted = 0)

    AND (Customers.dbo.Lead.IsDeleted = 0)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks everyone! It worked using with the COLLATE 🙂

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

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