Good Afternoon Community,
I am trying to create a Function to Get a Tax Rate but am getting an Error on Compiling the Function: I am trying to add the Local Rate and State Rate to get the Final "Tax_Rate"
create or replace function Get_Tax_Rate(Receipt_Date IN Date)
Return Number IS
Tax_Rate Number := local_tax_rate + state_tax_rate;
local_tax_rate number;
state_tax_rate number;
Begin
select local.tax_rate,
(Select state.tax\_rate
from tax\_rates state
where upper(state.tax\_type)='STATE')
into local_tax_rate,
state\_tax\_rate
from tax_rates local
where upper(local.tax_type) = 'LOCAL'
and local.effective_date = (select max(b.effective_date)
from tax\_rates b
where local.tax\_type = b.tax\_type
and b.effective\_date \<= Receipt\_Date);
Return(Tax_Rate);
End;
-----------------------------------------------------------------------------------------------------------------------------------
The Select Statement Returns This

Thanks in Advance
DSteele41