create function getItemName(pCodeNo varchar(40), pItemNo varchar(40)) returns varchar(200)
RETURN (SELECT COALESCE(itemname,pitemno) FROM code_library WHERE codeno = pCodeNo AND Itemno = pItemNo);

