ok...i already inserted into soccer tables by using variables
insert into soccer(weeknum,hometeam,homescore,awayteam,awaysco re)
values('&weeknum','&hometeam','&homescore','&awayt eam','&awayscore');
hmmm....how to calculate the no of played matches,win,drew,lost,ga,gc,total points.??
All the results are in soccer table which consist of weekno,hometeam,homescore,awayteam,awayscore but now i need to insert into actual table RESULTS which have Team,Win,Lost,ga,gc and total points as column...
i tried somethin like below which will enter the home team in results table...wat about away team?...I am afraid there will be duplication of team names
sorry, i m just a beginner
declare
cursor soccer_cursor is
select hometeam
from soccer;
v_hometeam varchar2(30);
v_team varchar2(30);
begin
if not soccer_cursor%isopen then
open soccer_cursor;
end if;
loop
fetch soccer_cursor into v_hometeam;
insert into results(team)
values(v_hometeam);
exit when soccer_cursor%notfound;
end loop;
close soccer_cursor;
end;