Have the following query and getting the ora-01008 error. Not sure what is causing.
Thought using colons would fix but no luck
Select
t.title,
t.name,
t.date,
t.type,
t.cost,
Case when t.type = :Parameter1 then 'X'
when t.type = 'Y' then 'A'
when t.type = 'X' then 'B' end [Type],
Case when Concat((Case when t.type = :Parameter1 then 'X'
when t.type = 'Y' then 'A'
when t.type = 'X' then 'B' end),t.title) = 'XBAR' then :Addedcost1 + t.cost
when Concat((Case when t.type = :Parameter1 then 'X'
when t.type = 'Y' then 'A'
when t.type = 'X' then 'B' end),t.title = 'XYARD') then :Addedcost2 + t.cost
else t.cost Total_Cost
from
table t
where
t.date >= to_date(:StartDate,'mm/dd/yyyy')
and t.date <(:EndDate,'mm/dd/yyyy')
and t.name = :Name
New contributor
user25750217 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.