我们使用客户端9使用SAP BO 3.1 SP5 for DB2 9.7创建了一个报告。现在我们已将DB2从9.7升级到10.5。因此,使用客户端10 z / OS,我们已连接SAP BO,但生成的查询与我们在连接客户端9时获得的查询不同。任何人都可以解释此问题吗?
是否无法将DB10.5与客户端10 z / OS连接?生成的查询是否因此版本差异而有差异?
对不起伙计们,我是BO的新手。也许这是一个愚蠢的问题,但我们必须回答这个问题。
提前致谢。
我已附上以下生成的查询:
由客户9生成:
SELECT
RPT_EMPLOYEE.FIRST_NAME,
RPT_EMPLOYEE.MIDDLE_NAME,
RPT_EMPLOYEE.LAST_NAME,
GENDER.ITEM_VALUE,
RPT_EMPLOYEE.DEPARTMENT,
SUB_DEPARTMENT.ITEM_VALUE,
RPT_EMPLOYEE.JOB_TITLE,
WD_JOB_GROUP.GROUP_NO,
WD_GLBT_LIST.DESCRIPTION,
WD_EEO_LIST.DESCRIPTION,
CASE WHEN RPT_EMPLOYEE.HAS_DISABILITY = -1 THEN ' ' ELSE DISABILITY.ITEM_VALUE END,
RPT_NEW_HIRE.HIRE_DT,
PART_OF_TEN.ITEM_VALUE,
WD_CLUB.LONG_NAME,
CASE WHEN RPT_EMPLOYEE.IS_ADDED <> 0 THEN HIRE_SOURCE.ITEM_VALUE ELSE '' END || '' ||
CASE WHEN RPT_EMPLOYEE.PROMOTED <> 0 THEN CASE WHEN RPT_EMPLOYEE.IS_ADDED <> 0 THEN ',' ELSE '' END || PROMOTED.ITEM_VALUE ELSE '' END || '' ||
CASE WHEN RPT_EMPLOYEE.IS_DEACTIVATED <> 0 THEN CASE WHEN RPT_EMPLOYEE.IS_ADDED <> 0 THEN ',' ELSE '' END || DEACTIVATED.ITEM_VALUE || '-' ELSE '' END || '' ||
CASE WHEN RPT_EMPLOYEE.IS_DEACTIVATED <> 0 THEN DEACTIVATION_REASON.ITEM_VALUE ELSE ' ' END
FROM
WD_KEY_LIST DEACTIVATION_REASON
LEFT OUTER JOIN RPT_DEACTIVATION ON RPT_DEACTIVATION.REASON_CODE=DEACTIVATION_REASON.ITEM_ID AND DEACTIVATION_REASON.KEY_ID=7
RIGHT OUTER JOIN RPT_EMPLOYEE ON RPT_DEACTIVATION.SURVEY_ID=RPT_EMPLOYEE.SURVEY_ID AND RPT_DEACTIVATION.CLUB_ID=RPT_EMPLOYEE.CLUB_ID AND RPT_EMPLOYEE.EMP_ID=RPT_DEACTIVATION.EMP_ID
LEFT OUTER JOIN RPT_NEW_HIRE ON RPT_EMPLOYEE.SURVEY_ID=RPT_NEW_HIRE.SURVEY_ID AND RPT_EMPLOYEE.CLUB_ID=RPT_NEW_HIRE.CLUB_ID AND RPT_EMPLOYEE.EMP_ID=RPT_NEW_HIRE.EMP_ID
LEFT OUTER JOIN WD_CLUB ON RPT_EMPLOYEE.CLUB_ID=WD_CLUB.CLUB_ID AND WD_CLUB.SURVEY_ID=RPT_EMPLOYEE.SURVEY_ID
LEFT OUTER JOIN WD_GLBT_LIST ON RPT_EMPLOYEE.SURVEY_ID=WD_GLBT_LIST.SURVEY_ID AND WD_GLBT_LIST.GLBT_ID=RPT_EMPLOYEE.GLBT_ID
LEFT OUTER JOIN WD_EEO_LIST ON RPT_EMPLOYEE.SURVEY_ID=WD_EEO_LIST.SURVEY_ID AND WD_EEO_LIST.EEO_ID=RPT_EMPLOYEE.EEO_ID
LEFT OUTER JOIN WD_JOB_GROUP ON RPT_EMPLOYEE.SURVEY_ID=WD_JOB_GROUP.SURVEY_ID AND WD_JOB_GROUP.JOB_GROUP_ID=RPT_EMPLOYEE.JOB_GROUP_ID
LEFT OUTER JOIN WD_KEY_LIST GENDER ON GENDER.ITEM_ID=RPT_EMPLOYEE.GENDER_ID AND GENDER.KEY_ID = 1
LEFT OUTER JOIN WD_KEY_LIST PART_OF_TEN ON PART_OF_TEN.ITEM_ID=RPT_EMPLOYEE.IS_TOP_10 AND PART_OF_TEN.KEY_ID=20
LEFT OUTER JOIN WD_KEY_LIST HIRE_SOURCE ON RPT_EMPLOYEE.IS_ADDED=HIRE_SOURCE.ITEM_ID and HIRE_SOURCE.KEY_ID=12
LEFT OUTER JOIN WD_KEY_LIST PROMOTED ON RPT_EMPLOYEE.PROMOTED=PROMOTED.ITEM_ID AND PROMOTED.KEY_ID=13
LEFT OUTER JOIN WD_KEY_LIST DISABILITY ON RPT_EMPLOYEE.HAS_DISABILITY=DISABILITY.ITEM_ID and DISABILITY.KEY_ID=4
LEFT OUTER JOIN WD_KEY_LIST DEACTIVATED ON RPT_EMPLOYEE.IS_DEACTIVATED=DEACTIVATED.ITEM_ID AND DEACTIVATED.KEY_ID=14
LEFT OUTER JOIN WD_SURVEY SURVEY ON RPT_EMPLOYEE.SURVEY_ID=SURVEY.SURVEY_ID
LEFT OUTER JOIN WD_KEY_LIST SUB_DEPARTMENT ON SUB_DEPARTMENT.ITEM_ID=RPT_EMPLOYEE.SUB_DEPARTMENT AND SUB_DEPARTMENT.KEY_ID = 21
WHERE
(
SURVEY.SHORT_NAME IN ('*******')
AND
SUB_DEPARTMENT.ITEM_VALUE = '*****'
)
由客户端生成z / OS:
SELECT
RPT_EMPLOYEE.FIRST_NAME,
RPT_EMPLOYEE.MIDDLE_NAME,
RPT_EMPLOYEE.LAST_NAME,
GENDER.ITEM_VALUE,
RPT_EMPLOYEE.DEPARTMENT,
SUB_DEPARTMENT.ITEM_VALUE,
RPT_EMPLOYEE.JOB_TITLE,
WD_JOB_GROUP.GROUP_NO,
WD_GLBT_LIST.DESCRIPTION,
WD_EEO_LIST.DESCRIPTION,
CASE WHEN RPT_EMPLOYEE.HAS_DISABILITY = -1 THEN ' ' ELSE DISABILITY.ITEM_VALUE END,
RPT_NEW_HIRE.HIRE_DT,
PART_OF_TEN.ITEM_VALUE,
WD_CLUB.LONG_NAME,
CASE WHEN RPT_EMPLOYEE.IS_ADDED <> 0 THEN HIRE_SOURCE.ITEM_VALUE ELSE '' END || '' ||
CASE WHEN RPT_EMPLOYEE.PROMOTED <> 0 THEN CASE WHEN RPT_EMPLOYEE.IS_ADDED <> 0 THEN ',' ELSE '' END || PROMOTED.ITEM_VALUE ELSE '' END || '' ||
CASE WHEN RPT_EMPLOYEE.IS_DEACTIVATED <> 0 THEN CASE WHEN RPT_EMPLOYEE.IS_ADDED <> 0 THEN ',' ELSE '' END || DEACTIVATED.ITEM_VALUE || '-' ELSE '' END || '' ||
CASE WHEN RPT_EMPLOYEE.IS_DEACTIVATED <> 0 THEN DEACTIVATION_REASON.ITEM_VALUE ELSE ' ' END
FROM
WD_KEY_LIST SUB_DEPARTMENT
LEFT OUTER JOIN RPT_EMPLOYEE ON SUB_DEPARTMENT.ITEM_ID=RPT_EMPLOYEE.SUB_DEPARTMENT AND SUB_DEPARTMENT.KEY_ID = 21
RIGHT OUTER JOIN RPT_NEW_HIRE ON RPT_EMPLOYEE.SURVEY_ID=RPT_NEW_HIRE.SURVEY_ID AND RPT_EMPLOYEE.CLUB_ID=RPT_NEW_HIRE.CLUB_ID AND RPT_EMPLOYEE.EMP_ID=RPT_NEW_HIRE.EMP_ID
RIGHT OUTER JOIN WD_CLUB ON RPT_EMPLOYEE.CLUB_ID=WD_CLUB.CLUB_ID AND WD_CLUB.SURVEY_ID=RPT_EMPLOYEE.SURVEY_ID
RIGHT OUTER JOIN WD_GLBT_LIST ON RPT_EMPLOYEE.SURVEY_ID=WD_GLBT_LIST.SURVEY_ID AND WD_GLBT_LIST.GLBT_ID=RPT_EMPLOYEE.GLBT_ID
RIGHT OUTER JOIN WD_EEO_LIST ON RPT_EMPLOYEE.SURVEY_ID=WD_EEO_LIST.SURVEY_ID AND WD_EEO_LIST.EEO_ID=RPT_EMPLOYEE.EEO_ID RIGHT
OUTER JOIN WD_JOB_GROUP ON RPT_EMPLOYEE.SURVEY_ID=WD_JOB_GROUP.SURVEY_ID AND WD_JOB_GROUP.JOB_GROUP_ID=RPT_EMPLOYEE.JOB_GROUP_ID
RIGHT OUTER JOIN WD_KEY_LIST GENDER ON GENDER.ITEM_ID=RPT_EMPLOYEE.GENDER_ID AND GENDER.KEY_ID = 1
RIGHT OUTER JOIN WD_KEY_LIST PART_OF_TEN ON PART_OF_TEN.ITEM_ID=RPT_EMPLOYEE.IS_TOP_10 AND PART_OF_TEN.KEY_ID=20
RIGHT OUTER JOIN WD_KEY_LIST HIRE_SOURCE ON RPT_EMPLOYEE.IS_ADDED=HIRE_SOURCE.ITEM_ID and HIRE_SOURCE.KEY_ID=12
RIGHT OUTER JOIN WD_KEY_LIST PROMOTED ON RPT_EMPLOYEE.PROMOTED=PROMOTED.ITEM_ID AND PROMOTED.KEY_ID=13
RIGHT OUTER JOIN WD_KEY_LIST DISABILITY ON RPT_EMPLOYEE.HAS_DISABILITY=DISABILITY.ITEM_ID and DISABILITY.KEY_ID=4
RIGHT OUTER JOIN RPT_DEACTIVATION ON RPT_DEACTIVATION.SURVEY_ID=RPT_EMPLOYEE.SURVEY_ID AND RPT_DEACTIVATION.CLUB_ID=RPT_EMPLOYEE.CLUB_ID AND RPT_EMPLOYEE.EMP_ID=RPT_DEACTIVATION.EMP_ID
LEFT OUTER JOIN WD_KEY_LIST DEACTIVATION_REASON ON RPT_DEACTIVATION.REASON_CODE=DEACTIVATION_REASON.ITEM_ID AND DEACTIVATION_REASON.KEY_ID=7
RIGHT OUTER JOIN WD_KEY_LIST DEACTIVATED ON RPT_EMPLOYEE.IS_DEACTIVATED=DEACTIVATED.ITEM_ID AND DEACTIVATED.KEY_ID=14
RIGHT OUTER JOIN WD_SURVEY SURVEY ON RPT_EMPLOYEE.SURVEY_ID=SURVEY.SURVEY_ID
WHERE
( SURVEY.CREATED_BY=SURVEY.IS_CREATED )
AND
(
SURVEY.SHORT_NAME IN ('*******')
AND
SUB_DEPARTMENT.ITEM_VALUE = '*******'
)
差异代替LEFT JOIN,RIGHT JOIN已在客户端10 z / OS中添加,并且在客户端10 z / OS中添加了附加条件SURVEY.CREATED_BY = SURVEY.IS_CREATED。