Error Code: 1305 MySQL, Function does not Exist -


i have problem. created function in mysql returns string (varchar data type).

here's syntax:

delimiter $$ use `inv_sbmanis`$$ drop function if exists `safetystockchecker`$$  create definer=`root`@`localhost` function `safetystockchecker` (jumlah int, safetystock int)    returns varchar(10) charset latin1 begin declare statbarang varchar(10); if jumlah > safetystock set statbarang = "stabil"; elseif jumlah = safetystock set statbarang = "perhatian"; else set statbarang = "kritis"; end if; return (statbarang); end$$ delimiter ; 

when call function call safetystockchecker(16,16), error:

query : call safetystockchecker(16,16)
error code : 1305
procedure inv_sbmanis.safetystockchecker not exist
execution time : 00:00:00:000
transfer time : 00:00:00:000
total time : 00:00:00:000

what's wrong function?

that not correct way call function. here's example call function:

select safetystockchecker(16,16) tablename 

the way doing calling stored procedure. why error says:

procedure inv_sbmanis.safetystockchecker not exist

because searching stored procedure , not function.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -