最近用到 INTERBASE数据库,但是存储过程有问题,请指点下SET TERM ^ ;create procedure NEW_PROCEDURE (
ATOTAL numeric(15,2),
APRICE numeric(15,2),
AQUANTITY integer,
AORDER_ID integer)
as
begin
/* Procedure Text */
for select order_id from order //这里提示错误
into :aorder_id
do begin
atotal=0
for select order_quantity,price from item
where order_id=:aorder_id
into :aquantity,:aprice
do begin
atotal=atotal+:aquantity*:aprice;
end
update order set order_total=:atotal
where order_id=:aorder_id;
end
suspend;
end^SET TERM ; ^GRANT EXECUTE ON PROCEDURE NEW_PROCEDURE TO SA;
错误信息 :
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 9, char 26.
order.
ATOTAL numeric(15,2),
APRICE numeric(15,2),
AQUANTITY integer,
AORDER_ID integer)
as
begin
/* Procedure Text */
for select order_id from order //这里提示错误
into :aorder_id
do begin
atotal=0
for select order_quantity,price from item
where order_id=:aorder_id
into :aquantity,:aprice
do begin
atotal=atotal+:aquantity*:aprice;
end
update order set order_total=:atotal
where order_id=:aorder_id;
end
suspend;
end^SET TERM ; ^GRANT EXECUTE ON PROCEDURE NEW_PROCEDURE TO SA;
错误信息 :
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 9, char 26.
order.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货