Jump to content

PLS-00302: component 'Variable' must be declared


diego_el_mestre
 Share

Recommended Posts

Muito boa tarde, estou a meios de um trabalho de base de dados, mas encalhei numa precedure, que me está a dar um erro gostava k alguem me ajudasse... os erros são

Error(14,9): PL/SQL: Statement ignored

Error(14,41): PLS-00302: component 'MED' must be declared

create or replace

procedure proc_media_08(whisky char) is

  cursor med is

  select f.nome, avg(fa.preco_fornecedor) from dk6_fornecedor_artigo fa, dk6_artigo_capacidade ac, dk6_fornecedor f

  where ac.cod_artigo=fa.cod_artigo and f.cod_fornecedor= fa.cod_fornecedor and ac.designacao like whisky and (fa.inicio_comer>'2008.01.01' and (fa.fim_comer<'2008.12.31' or fa.fim_comer is null))

  group by f.nome;     

  dadosmedia med%ROWTYPE;



  begin

    open med;

      LOOP

        fetch med into dadosmedia;

        exit when med%notfound;

        dbms_output.put_line(dadosmedia.med);

    end loop;

    close med;

  end proc_media_08;

Desde já o meu muito obrigado

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.