oracleÓαêʵÏÖ¶àÖØÑ»·
[sql]
declare
-- Local variables here
i integer;
cursor c_province is select ds.swjg_dm from dm_swjg ds where ds.swjg_dm!=0;
cursor c_year is select distinct yh.tjyf from ygz_hs yh where yh.tjyf like '2013%' group by yh.tjyf;
begin
-- Test statements here
i:=0;
for cp in c_province loop
for cy in c_year loop
i:=i+1;
--dbms_output.put_line('i='||i||'=='||cp.swjg_dm||cy.tjyf); -------------Êä³ö½á¹û¼¯
insert into ygz_hs values (cp.swjg_dm,cy.tjyf,'15000','15000','С¹æÄ£ÄÉ˰ÈË');
end loop c_year;
end loop c_province;
end;
Ò»ÌõSQL¸ã²»µàµÄʱºò£¬Òª¿¼ÂÇÑ»·ÓαêµÄʹÓá£
oracle¿ÉÒÔ×öºÜ¶àÊÂÇ飬¶à³¢ÊÔ£¬¶à¶¯ÄԾͻáÓкܴóµÄÊÕ»õ¡£