收藏慢慢看作者: lxcorange 时间: 2013-6-18 20:25
好东西,学习了作者: 熊猫吃竹叶 时间: 2013-7-18 21:19
好东西,收藏了。作者: 花落无声_spj 时间: 2013-7-23 14:40
趣题 输出五角星那个有意思...
瞄了半天,刚刚看懂
照搬原版代码。输出一个奥迪吧
with a as ( select distinct a.x + 32*b.l x,a.y y from
(select distinct round(sum(x) over(order by n)) x,
round(sum(y) over(order by n)) y
from (select n,
cos(trunc(n / 2) * (1-9/10) * 3.1415926) * 3 x,
sin(trunc(n / 2) * (1-9/10) * 3.1415926) y
from (select rownum - 1 n from all_objects where rownum <= 2 * 20))) a,
(select level - 1 l from dual connect by level < 5) b
)
select replace(sys_connect_by_path(point, '/'), '/', null) "奧迪"
from (select b.y, b.x, decode(a.x, null, ' ', '*') point
from a,
(select *
from (select rownum - 1 + (select min(x) from a) x
from all_objects
where rownum <= (select max(x) - min(x) + 1 from a)),
(select rownum - 1 + (select min(y) from a) y
from all_objects
where rownum <= (select max(y) - min(y) + 1 from a))) b
where a.x(+) = b.x
and a.y(+) = b.y)
where x = (select max(x) from a)
start with x = (select min(x) from a)
connect by y = prior y
and x = prior x +1; 作者: xusdream 时间: 2013-8-3 16:26
支持楼主,顶,mark下,哈哈作者: ldds_520 时间: 2013-8-7 13:44
学习一下!作者: Nikita_he 时间: 2013-8-13 01:02
正在按照这思路学习,看到三思笔记oracle函数介绍这。果断做个记号,差点找不到了作者: 三市白 时间: 2013-8-26 15:44 本帖最后由 三市白 于 2013-8-26 15:45 编辑