读书人

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

发布时间: 2012-02-07 17:45:36 作者: rapoo

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)

读书人网 >VFP

热点推荐