MySQL Forums
Forum List  »  Serbian/Croatian/Bosnian

Procedura
Posted by: goran vojvodic
Date: April 02, 2008 01:02AM

Pozdrav

Imam jedno pitanje.
Kako bi trebala izgledati procedura koja ima ulazni parametar a koristi LIKE u SELECT-u?
Ja sam probao nesto ovako:

DELIMITER $$

DROP PROCEDURE IF EXISTS `baza`.`testnaziv`$$

CREATE PROCEDURE `testnaziv`(IN cNaziv VARCHAR(45))
BEGIN
DECLARE cTrazi VARCHAR(45);
SET cTrazi = '%' + cNaziv + '%';
SELECT * from tabela WHERE ime LIKE cTrazi;
END$$

DELIMITER ;


Ali dobijem gresku :

Error Code : 1267

Illegal mix of collations (cp1250_croatian_ci,IMPLICIT) and
(cp1250_general_ci,IMPLICIT) for operation 'like'


Ima li tko kakvu ideju?

Hvala unaprijed

g

Options: ReplyQuote


Subject
Views
Written By
Posted
Procedura
12724
April 02, 2008 01:02AM
6880
April 09, 2008 02:09AM
6159
September 01, 2008 06:23AM
6559
October 02, 2008 02:56AM


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.