要求:根据图书分类表,更新图书登记表中黄色区域信息各位 抽空帮帮忙了!!!不胜感激啊
oracle
oracle
解决方案 »
- SQL数据过滤问题,求大神解答
- ORACLE的同步复制与SQL SERVER的同步复制在实现上有什么区别?它们都是不透明的吗?
- 请教¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥
- sybase的存储过程转换到oracle上的问题
- ORACLE新手提问
- 导出数据库的时候出现1466错误,请问怎么解决?
- 小弟初用Oracle各位同行先进指点一二?关于Imp的问题!!!
- 关于在PROCEDURE中使用游标的问题!!
- sql语句
- oracle中,一个表的某个字段想设置成为自增的该怎么操作?\
- oracle 10g安装问题 在oraparam.ini中未找到先决条件检查
- oracle命令:command not found!
2 select 1 id, 'literature|history' categoryname, null fatherid from dual
3 union all
4 select 2 id, 'lang' name, 1 fatherid from dual
union all
select 9 id, 'English' name, 2 fatherid from dual
),
books as (
select 1 id, 'CET4' bookname, 9 categoryid from dual
union all
select 2 id, 'Chinese' bookname, 2 categoryid from dual
)
select t1.id bookid, t1.bookname, t2.categoryid
from books t1,
(select id, sys_connect_by_path(categories.id, '/') categoryid
from categories
start with categories.fatherid is null
connect by prior categories.id = categories.fatherid) t2
where t1.categoryid = t2.id; 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 BOOKID BOOKNAM CATEGORYID
---------- ------- --------------------------------------------------
2 Chinese /1/2
1 CET4 /1/2/9
搞成这样先,后面的字符串,你用SUBSTR,INSTR那样的函数截下。