Error while calling function.
Hi All,
I have imported a database dump file in MySql which result in the creation of the database containing tables and data. After the dump was imported successfully I created a function and it was created successfully but when I called that function it returned me with the below mentioned Error.
mysql> select f_emp_code('0001')//
ERROR 1267 (HY000): Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='
Below is the function I created.
mysql> delimiter //
mysql> create function f_emp_code ( v_emp_code varchar(60)) RETURNS varchar(60)
-> BEGIN
-> DECLARE empcode varchar(60);
-> select emp_code INTO empcode from hris_pim where emp_code=v_emp_code;
-> RETURN enpcode;
-> END //
Query OK, 0 rows affected (0.03 sec)
Searching over the net I found that If we use command:
mysql> show full columns for table_name;
Then we are going to see the COLLATION column regarding which I am getting the error.
Can anyone help me out how to solve this error.
Thanks & Regards
Deepak
Subject
Written By
Posted
Error while calling function.
February 16, 2011 01:31AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.