I am learning oracle and i am beginner. Please solve my following error.
create or replace
PROCEDURE SP_SALE_SELECT
( para1 OUT NVARCHAR2
, para2 OUT NVARCHAR2
, action IN NVARCHAR2
) AS
BEGIN
IF action = 1 then
Select * From VI_Sale;
Else if action = 2 then
Select * From VI_Sale
WHERE SaleID = para1;
Else if action = 3 then
Select * From VI_Sale
Where CustomerID = para1;
Else if action = 4 then
Select * From VI_Sale
where SaleID = para1 and CustomerID = para2;
End if;
END SP_SALE_SELECT;
Error(20,5): PLS-00103: Encountered the symbol “SP_SALE_SELECT” when
expecting one of the following: if
You use
ELSE IFinstead ofELSEFIF(no space) so you are creating additional ifs which you should close.