简体   繁体   中英

How to Insert a stored procedure into sql developer

I'm trying to create an INSERT stored procedure in my database using Oracle SQL Developer but I can't seem to figure out what's the problem with this code;

create or replace procedure insert_order
as  
BEGIN 
    INSERT INTO ORDERS (ORDER_NUM, ORDER_DATE, CONDITION, STATUS, CUSTOMER_CUSTOMER_NUM, CUSTOMER_EMPLOYEE_NUM)
    VALUES(1, '30/OCT/2007', 'BRANDNEW', 'ORDERD', 103, 1); 
end insert_order;

Can you help please?

The error message PL/SQL: SQL Statement ignored, and Error(5,23): PL/SQL: ORA-00984: column not allowed here indicates that the error is with the value '30/OCT/2007' (line 5, column 23), since you are not using the standard format for dates.

You can try TO_DATE('30/OCT/2007') or '2007-10-30' .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM