**这里路径有问题
LOCAl sf
sf='alink1'
SELECT * FROM ( ;
SELECT '各服务部'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE L101=132 UNION ;
SELECT '下属'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE L101=112 UNION ;
SELECT '销售门市部'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE (L101=132 OR L101=133) OR l101<>13206 UNION ;
SELECT '其他有关部门'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE (L101=132 OR L101=113)) aa INTO CURSOR Aa
USE IN &sf
WITH this
.AddObject('dd','dataenvironment')
.dd.addobject('cursor1','cursor')
.dd.cursor1.alias='aa'
.dd.cursor1.buffermodeoverride=2
.cbgrid1.RecordSourceType= 1
.cbgrid1.RecordSource='aa'
ENDWITH
LOCAl sf
sf='alink1'
SELECT * FROM ( ;
SELECT '各服务部'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE L101=132 UNION ;
SELECT '下属'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE L101=112 UNION ;
SELECT '销售门市部'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE (L101=132 OR L101=133) OR l101<>13206 UNION ;
SELECT '其他有关部门'as 部门类型, L101 as 代码,L102 as 部门名称 FROM &sf WHERE (L101=132 OR L101=113)) aa INTO CURSOR Aa
USE IN &sf
WITH this
.AddObject('dd','dataenvironment')
.dd.addobject('cursor1','cursor')
.dd.cursor1.alias='aa'
.dd.cursor1.buffermodeoverride=2
.cbgrid1.RecordSourceType= 1
.cbgrid1.RecordSource='aa'
ENDWITH
回复Comments
作者:
{commentrecontent}