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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -