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
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.