-3
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;
/
4

2 に答える 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

一見すると、「select」という単語が抜けているように見えます

AS BEGIN
if
this is where you are missing the word select
to_char(sysdate, 'mm') = '01'
etc
于 2013-02-18T17:34:16.483 に答える