楼主的就是Oracle的写法吧?SQL Server中这么写:update A
set
parent_id=B.menuitem_id
from
sec_menuitem A,
sec_menuitem B
where
B.menucode = LEFT(A.menucode,LEN(A.menucode)-2)
set
parent_id=B.menuitem_id
from
sec_menuitem A,
sec_menuitem B
where
B.menucode = LEFT(A.menucode,LEN(A.menucode)-2)
解决方案 »
- 指定oracle的表空间问题。
- C++连接Oracle数据库可以不设置tnsnames.ora文件吗
- 求助!!!如何用第三方客户端远程访问unix系统下的oracle7数据库!!!
- oracle如何查询某个库中的存储过程都调用哪些表的问题?
- pde文件进行导入时,提示表空间不存在
- oracle9i内存调整后的问题.
- 想用触发器实现“自增序列”的功能,望给出实例。多谢。
- Oracle精华贴-1
- 关于 alter database archivelog
- 我按照标准模式安装Oracle8.1.7的服务器版,安装成功后,我想把oracle自动占用的那个80端口改掉,不让一输入localhost 就进入了oracle ht
- 建表的问题
- 游标循环的问题
update A set parent_id= (select menuitem_id from sec_menuitem where menucode = left(A.menucode,len(A.menucode)-2))
from sec_menuitem AOracle:
update A set parent_id= (select menuitem_id from sec_menuitem where menucode = substr(A.menucode,length(A.menucode)-2))
from sec_menuitem A
oracle运行出现错误???
from sec_menuitem A
where exists(select menuitem_id from sec_menuitem where menucode = substr(A.menucode,length(A.menucode)-2))
set parent_id =
(select a.menuitem_id from sec_menuitem a where a.menucode = substr(menucode,length(menucode)-2))
在oracle中substr()参数应该是三个,substr(string,start,length)
好像是
update
set
where
update (select a.order_no as vv,b.node_level as bb from gas a , dept b
where a.super_dept_id = b.dept_no and b.dept_no = 'aaa')
set vv = bb