use tingchechang
create procedure PROCFee
@车牌号码 char(7),
@Fee int output
as
select CarNum,Intime,Outtime,@Fee as'Fee'
from Park
where Outtime is not null and CarNum=@车牌号码 and
select @Fee=case
when datediff(n,Intime,Outtime)>='480' then 60
when datediff(n,Intime,Outtime)>='30' then datediff(n,Intime,Outtime)*8
ELSE 0
END
执行显示:
关键字 'select' 附近有语法错误。(select @Fee=case)
为什麽错。怎麽改。