microsoft project server
enterprise project outline code
1SELECT A.ATTRIB_FIELD_ID,B.AS_VALUE
2
3FROM
4
5MSP_FIELD_ATTRIBUTES A,
6
7MSP_ATTRIBUTE_STRINGS B
8
9WHERE
10
11A.PROJ_ID = B.PROJ_ID
12
13AND A.AS_ID = B.AS_ID
14
15AND A.ATTRIB_FIELD_ID >= 188744529
16
17AND A.ATTRIB_FIELD_ID <= 188744768
18
19AND A.ATTRIB_ID = 206
20
21AND A.PROJ_ID = 424
22
23ORDER BY A.ATTRIB_FIELD_ID
2
3FROM
4
5MSP_FIELD_ATTRIBUTES A,
6
7MSP_ATTRIBUTE_STRINGS B
8
9WHERE
10
11A.PROJ_ID = B.PROJ_ID
12
13AND A.AS_ID = B.AS_ID
14
15AND A.ATTRIB_FIELD_ID >= 188744529
16
17AND A.ATTRIB_FIELD_ID <= 188744768
18
19AND A.ATTRIB_ID = 206
20
21AND A.PROJ_ID = 424
22
23ORDER BY A.ATTRIB_FIELD_ID
需要注意的是
proj_ID 是改变的,一旦修改了企业自定义大纲代码它就会改变。
它是怎么来的呢?
可以根据
这个存储过程得到exec MSP_PDS_ReadGlobalInfo
这是存储过程定义
SELECT PROJ_NAME,PROJ_ID FROM MSP_PROJECTS WITH (NOLOCK, INDEX=I_MSP_PROJECTS_PROJ_TYPE) WHERE PROJ_TYPE = 2
这个查询的with 子句指定了查询时候使用的索引。
查询结果是
ATTRIB_FIELD_ID AS_VALUE
188744589 Project Status
188744590 Project Category
188744591 Project Phase
188744592 Product Development Manager
188744593 Project Manager
188744594 Project Assistant
188744729 Remark