diego_el_mestre Posted December 5, 2009 at 08:31 PM Report Share #298840 Posted December 5, 2009 at 08:31 PM 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 More sharing options...
M6 Posted December 9, 2009 at 12:06 PM Report Share #299452 Posted December 9, 2009 at 12:06 PM dadosmedia.med não existe. Deduzo que seja o resultado de avg(fa.preco_fornecedor), mas não lhe deste um nome. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now