MySQL error after linking the report

(2 posts) (2 voices)

Tags:

No tags yet.

  1. bushraj, Member

    This the error which Im getting when opening the linked report :

    "
    Could not execute the report. There was an error in the report.
    Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '='"

    Linked Report procedure :

    DROP PROCEDURE IF EXISTS sp_DBR_ProjectSummaryLinked
    $$
    CREATE PROCEDURE sp_DBR_ProjectSummaryLinked(monthN varchar(45))
    Begin

    select APP_NUMBER as ID,txt_prj_CallID as Project ID / Call ID ,txtPurchase_Order_Number as Purchase Order No ,

    dt_Project_approved_date as Project Approve Date,cmb_prj_Product as Project / Product,txt_prj_Title as Project Titles,

    cmb_prj_Project_Manager as Project Manager,cmb_prj_BD_Account_Manager as Business Account Manager,

    current_project_status as Project Status,chosen_prj_next_Phase as Project Phase,SIT_Actual_End as Deployment-SIT End Date,

    UAT_A_End as Deployment-UAT End Date , Cut_s_End as Deployment-Cutover End Date from wf_project_tracker.project_tracker_master
    where Current_Project_phase_master like '%Planning and Requirement Finaliz%'

    and monthname(Last_Modification_date_time)=monthN;

    end
    $$

    Can you please help me, Why this problem is coming?

  2. myDBR Team, Key Master

    Collation errors mean that you are trying to compare two strings that have different character set / collate definitions. Collation is a set of rules which determines how characters are compared to eachother.

    In your setup you have your wf_project_tracker and mydbr databases to use different character sets and collations. Now that you run the query and compare a string (monthN) using utf8_general_ci to a string using latin1_swedish_ci (Last_Modification_date_time) MySQL complains about it.

    You can convert the string to another character set / collation using COLLATE clause:

    and monthname(Last_Modification_date_time) COLLATE utf8_general_ci =monthN;

    See more information about character sets and collations from MySQL Documentation.

    --
    myDBR Team


Reply

You must log in to post.