Hi all,
I am getting the below error for the submited code.. please help..
declare
Spend_in_CR_Baby number (18,4);
Spend_in_CR_Child number (18,4);
Spend_in_CR_Home number (18,4);
Spend_in_CR_Man number (18,4);
Spend_in_CR_Woman number (18,4);
v_CUST_KEY number (10,0);
v_DIV_DESC varchar2(30);
begin
select CUST_KEY into v_CUST_KEY , DIV_DESC into v_DIV_DESC from match,
if DIV_DESC = 'CR Baby' then Spend_in_CR_Baby := sale_amt;
elsif DIV_DESC = 'CR Child' then Spend_in_CR_Child := sale_amt;
elsif DIV_DESC = 'CR Home' then Spend_in_CR_Home := sale_amt;
elsif DIV_DESC = 'CR Man' then Spend_in_CR_MAN := sale_amt;
elsif DIV_DESC = 'CR Woman' then Spend_in_CR_Woman := sale_amt;
end if;
end;
Error report:
ORA-06550: line 10, column 44:
PL/SQL: ORA-00923: FROM keyword not found where expected
ORA-06550: line 10, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 12, column 8:
PLS-00103: Encountered the symbol "DIV_DESC" when expecting one of the following:
:= . ( @ % ;
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action: