CREATE OR REPLACE PROCEDURE spInsertSale2(SALES_ID in number,PRODUCT in varchar2,UNITCOST in decimal,QUANTITY in number)
AS
BEGIN
if to_char(sysdate,'mm') from dual = '01' then
{
INSERT INTO Studenta_1004195.SALES VALUES(SALES_ID,PRODUCT,UNITCOST,QUANTITY);
}endif
END spInsertSale2;
/
问问题
91 次
2 回答
2
您的语法已关闭:
CREATE OR REPLACE PROCEDURE spInsertSale2(
SALES_ID in number,PRODUCT in varchar2,UNITCOST in decimal,QUANTITY in number)
AS
BEGIN
if to_char(sysdate,'mm') = '01' then
INSERT INTO Studenta_1004195.SALES
VALUES(SALES_ID,PRODUCT,UNITCOST,QUANTITY);
end if;
END spInsertSale2;
/
于 2013-02-18T17:38:18.150 回答
1
乍一看,您似乎缺少“选择”一词
AS BEGIN
if
this is where you are missing the word select
to_char(sysdate, 'mm') = '01'
etc
于 2013-02-18T17:34:16.483 回答