Why does the following work in SQL*Plus and not in a store procedure ?
select sum(case when VCICATEGORY = 'Very Good' then
processendkm-processstartkm
end) LenVCIVG,
sum(case when VCICATEGORY = 'Good' then
processendkm-processstartkm
end) LenVCIG,
sum(case when VCICATEGORY = 'Fair' then
processendkm-processstartkm
end) LenVCIF,
sum(case when VCICATEGORY = 'Poor' then
processendkm-processstartkm
end) LenVCIP,
sum(case when VCICATEGORY = 'Very Poor' then
processendkm-processstartkm
end) LenVCIVP
into LenVCIVG,LenVCIG,LenVCIF,LenVCIP,LenVCIVP
from processhistory;
Into clause are naturally only added for store procedure and taken out for SQL*Plus.
Thanks
Karen
select sum(case when VCICATEGORY = 'Very Good' then
processendkm-processstartkm
end) LenVCIVG,
sum(case when VCICATEGORY = 'Good' then
processendkm-processstartkm
end) LenVCIG,
sum(case when VCICATEGORY = 'Fair' then
processendkm-processstartkm
end) LenVCIF,
sum(case when VCICATEGORY = 'Poor' then
processendkm-processstartkm
end) LenVCIP,
sum(case when VCICATEGORY = 'Very Poor' then
processendkm-processstartkm
end) LenVCIVP
into LenVCIVG,LenVCIG,LenVCIF,LenVCIP,LenVCIVP
from processhistory;
Into clause are naturally only added for store procedure and taken out for SQL*Plus.
Thanks
Karen