insert into b
select id,tt,x1,y1,x2,y2,x3,y3,x4,y4 from a
union all
select id,tt,x5,y5,x6,y6,x7,y7,x8,y8 from a
union all
...
union all
select id,tt,x29,y29,x30,y30,x31,y31,x32,y32 from a;
select id,tt,x1,y1,x2,y2,x3,y3,x4,y4 from a
union all
select id,tt,x5,y5,x6,y6,x7,y7,x8,y8 from a
union all
...
union all
select id,tt,x29,y29,x30,y30,x31,y31,x32,y32 from a;
解决方案 »
- rman备份级别 oracle11g
- oracle体系结构问题!
- 如何获得当前年月和某年月的天数?
- oracle rman备份的问题。
- 在PL/SQL中,怎样判断一次查询的结果是否为空?
- Oracle8.1.5下用DBASSIST创建数据库失败,错误号ORA-01501
- 如何实现在oracle一个数据库中实时的从另一个数据库的一张表中取得其新增数据,并插入
- 我是一个Oracle的初学者。我以前用SQLServer2000,一个小问题
- 在oracle中查看刚执行的语句的一个问题
- 请教PLSQL查询反应慢问题
- 安装oracle第三张盘的时候,出现OracleOra90Agent出错,错误是259:没有可用的数据,请教?
- 下面的语句是什么意思?
cursor cur is select * from a;
tab a%rowtype;
t_command varchar2(100);
i integer;
begin
open cur;
<<loop1>>
loop
fetch cur into tab;
exit when cur%notfound;
i:=1;
<<loop2>>
while i<30 loop
t_command:='insert into b value (tab.id, tab.tt, tab.x'||i||', tab.x'||i+1||
', tab.x'||i+2||', tab.x'||i+3||', tab.x'||i+4||')';
execute immediate t_command;
i:=i+4;
end loop loop2;
end loop loop1;
close cur;
end;
作个测试有个了解之后再作操作.这样能加深体会@!
1、在表A中对于每个TT,X32、Y32对应下一行的X1、Y1,因此表A中的记录是将一条长链分割成若干行,每行有32组坐标,而现在要做的是每行4组坐标。
2、id字段的作用,按id递增排列每个TT的坐标
3、在表A中的每个TT的坐标结束标志是什么?