Bind variables

Below is a query I am trying to compile in 10.2.0.1. I keep getting PLS-00049 Bad bind Variable. I don't see anything wrong with this one. Can anyone help me?


##############################################
create or replace procedure ddh_test2 as
begin
SELECT
uwsias.i_maj_credits_cpc.year,
uwsias.i_maj_credits_cpc.term,
uwsias.i_maj_credits_cpc.unit,
uwsias.i_maj_credits_cpc.unit_name,
uwsias.i_maj_credits_cpc.major,
uwsias.i_maj_credits_cpc.major_name,
DECODE (
SUM (uwsias.i_maj_credits_cpc.off_credits_lvl3),
0, 0,
SUM (uwsias.i_maj_credits_cpc.off_credits_lvl3 * uwsias.i_maj_credits_cpc.cost_per_credit_lvl3) / SUM (uwsias.i_maj_credits_cpc.off_credits_lvl3)) major_cpc
FROM
uwsias.i_maj_credits_cpc
WHERE
uwsias.i_maj_credits_cpc.year = :year using year AND
uwsias.i_maj_credits_cpc.term = '1' AND
uwsias.i_maj_credits_cpc.major = :major_code using major_code
GROUP BY
uwsias.i_maj_credits_cpc.year,
uwsias.i_maj_credits_cpc.term,
uwsias.i_maj_credits_cpc.unit,
uwsias.i_maj_credits_cpc.unit_name,
uwsias.i_maj_credits_cpc.major,
uwsias.i_maj_credits_cpc.major_name;
end;


###################################################33


Other related posts: