当前位置: 代码迷 >> VFP >> vfp子查询嵌套太深,怎么处理
  详细解决方案

vfp子查询嵌套太深,怎么处理

热度:385   发布时间:2013-02-26 00:00:00.0
vfp子查询嵌套太深,怎么办?
update   salary   set   基本工资=基本工资+gz     where     salary.员工编号   in   (select   员工编号   from   personnel   where   personnel.部门编号   in   (select     部门编号   from   department   where   部门名称=xz))

系统提示我   子查询嵌套太深,请问在vfp6.0怎么办,听说可以用cursor搞,不知道怎么写!

------解决方案--------------------------------------------------------
分开写:

select 员工编号 into cursor t1 from personnel where personnel.部门编号 in (select 部门编号 from department where 部门名称=xz))

update salary set 基本工资=基本工资+gz where salary.员工编号 in (select 员工编号 from t1)
  相关解决方案