Код ошибки 1583 в SQL с функцией процедуры

Я запускаю приведенный ниже код, но продолжаю получать код ошибки, в котором указано, что

некорректные параметры при вызове нативной функции concat

Я не уверен, где произошла моя ошибка.

      drop procedure if exists TotalSale;
delimiter //
create procedure TotalSale(x int(20))
Begin
    declare y,z,s decimal(20,2);
    set y=0, z=0, s=y*z;
    if x in (select sku from info) 
    then
        select NumberSold into y from sales where sku=x;
        if y in (select NumberSold from sales) 
        then
            select price into z from info where sku=x;
            if z in (select price from info)
            then
                select y*z into s;
                select Concat('Total Sales of', x, 'is $', s) as TotalSales;
            else select Concat(x, 'is not a product') as NotFound;
            end if;
end//
delimiter ;

0 ответов

Другие вопросы по тегам