Home > database >  Oracle stored procedures into the reference for air conditioning use an error
Oracle stored procedures into the reference for air conditioning use an error

Time:09-18

Wrote a stored procedure in which the third into the parameter can be null, in the case of not null, the call is normal,
Once Serv_Num into the empty they call error,
The CREATE OR REPLACE PROCEDURE GET_PURCHASERS (the START_DATE IN VARCHAR2,
END_DATE IN VARCHAR2,
Serv_Num VARCHAR2 IN default ',
P_CUR OUT SYS_REFCURSOR) IS
.
Serv_Num into the parameter is empty called when SQL is such code (call)
Call GET_PURCHASERS (' 2019-03-02 ', '2019-04-02', and 'cursor')
An error ORA - 00936: missing expression
But when I was in PLSQL test this field don't preach is no problem ah,


Why call GET_PURCHASERS (' 2019-03-02 ', '2019-04-02', and 'cursor') so that it can't call? When should be the third parameter is empty, also spread '? But not set the default value is ",

CodePudding user response:

Pl/SQL developer? To enter a Null parameter is empty

CodePudding user response:

Try this
Call GET_PURCHASERS (' 2019-03-02 ', '2019-04-02', NULL, 'cursor');

CodePudding user response:

Or
Call GET_PURCHASERS (' 2019-03-02 ', '2019-04-02', ' 'and' cursor ');

CodePudding user response:

You need to give the field a place ah, what if you don't write, the default parameters are not enough
  • Related