水晶报表:左外连接

时间:2018-12-17 06:38:48

标签: sql crystal-reports

早上好

此查询中存在一些错误,姓氏相同的人(“ CRW”。“ CRW_FSTN”)未出现在列表中。结果应该是没有特定课程的所有雇员的列表(“ COU”。“ COU_CODE”)

有人可以向我解释错误的地方吗?

谢谢

 SELECT "CRW"."CRW_TAG", "RES"."RES_STATUS", "CRW"."CRW_NAME", "COU"."COU_CODE", "REQ"."REQ_COUID", "TAK"."TAK_COUID", "TYP_CRW"."TYP_COMMENT", "ORG"."ORG_CODE", "CRW"."CRW_FSTN", "COU"."COU_NAME"
 FROM   "FIDELIO"."COU" "COU", "FIDELIO"."REQ" "REQ", "FIDELIO"."ORG" "ORG", "FIDELIO"."CRW" "CRW", "FIDELIO"."TYP_CRW" "TYP_CRW", "FIDELIO"."TAK" "TAK", "FIDELIO"."RES" "RES"
 WHERE  ("COU"."COU_ID"="REQ"."REQ_COUID") AND ("REQ"."REQ_ORGID"="ORG"."ORG_ID") AND ("ORG"."ORG_ID"="CRW"."CRW_POS") AND ("ORG"."ORG_CREW"="TYP_CRW"."TYP_ART" (+)) AND ("CRW"."CRW_ID"="TAK"."TAK_CRWID" (+)) AND ("CRW"."CRW_ID"="RES"."RES_ACC") AND "CRW"."CRW_TAG"='C' AND ("RES"."RES_STATUS"='CC' OR "RES"."RES_STATUS"='CL')
 ORDER BY "COU"."COU_CODE", "CRW"."CRW_NAME"

0 个答案:

没有答案