MySQL Forums
Forum List  »  Quality Assurance

creating stored procedure problem
Posted by: masoud tamizi
Date: February 13, 2012 11:44PM

why when i try to create this procedure :

DELIMITER $$
DROP PROCEDURE IF EXISTS `cash`.`update_user_real` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `cash`.`update_user_real`(
in `sp_national` char(10),
in `sp_first` varchar(45) ,
in `sp_last` varchar(45),
in `sp_father` varchar(45) ,
in `sp_sh` varchar(10) ,
in `sp_sh_s` varchar(15) ,
in `sp_gender` char(1) ,
in `sp_date` date ,
in `sp_location` varchar(45),
in `sp_mail` varchar(45),
in `sp_home_addr` varchar(255),
in `sp_home_phone` char(11),
in `sp_postal` char(10),
in `sp_job` varchar(45),
in `sp_job_addr` varchar(255),
in `sp_job_phone` char(11),
in `sp_mob` char(11),
in `sp_comment` text,
in `sp_fax` char(11))
BEGIN
update `cash`.`user_real`
set first_name=sp_first,
last_name=sp_last,
father_name=sp_father,
sh_sh=sp_sh,
sh_s_sh=sp_sh_s,
gender=sp_gender,
birth_date=sp_date,
birth_location=sp_location,
email=sp_mail,
home_address=sp_home_addr,
home_phone=sp_home_phone,
postal_code=sp_postal,
job_title=sp_job,
job_address=sp_job_addr,
job_phone=sp_job_phone,
mobile=sp_mob,
`comment`=sp_comment,
fax=sp_fax
where national_code=sp_national;
END $$
DELIMITER ;

i encounter this error :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER' at line 42

Options: ReplyQuote


Subject
Views
Written By
Posted
creating stored procedure problem
2350
February 13, 2012 11:44PM


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.