Error in case in mysql for creating procedure -
create procedure temp (in empid int) begin declare emptype varchar; select emptype = qoute(emptype) dms_document id = empid; select emptype case when emptype = 'p' select doctype dms_report pilot = 1 else select 'no documents required' end case end;
this query creating procedure in mysql, getting error in case statement please hlep me why error coming how declare case statement why error coming in workbench creating procdure
here formatted procedure use delimiter
delimiter // create procedure temp ( empid int) begin declare var_etype varchar(36); select emptype = qoute(emptype) dms_document id = empid; select emptype, case when emptype = 'p' doctype else 'no documents required' end dms_report pilot = 1; end// delimiter ;
Comments
Post a Comment