我需要帮助使用PeopleTools Application Designer在PeopleSoft中创建视图。在ORACLE SQL Developer中运行下面的视图SQL时,它选择完全正常,但当我在App Designer中将其创建为视图时,我收到以下错误:
错误:UM_7902_VW - SQL错误。错误位置:27返回:1730 - ORA-01730:指定的列名无效。
这是我的sql:
SELECT A.EMPLID, B.NAME, A.ADM_APPL_NBR, C.ADMIN_FUNCTION, A.STDNT_CAR_NBR,
A.ACAD_CAREER, D.APPL_PROG_NBR, D.ADMIT_TERM, C.CHECKLIST_CD, E.DESCRSHORT,
C.CHECKLIST_STATUS, C.STATUS_DT, C.DUE_DT AS C_DUE_DT, C.COMM_COMMENTS,
C.SEQ_3C, F.CHKLST_ITEM_CD,
G.DESCR, F.ITEM_STATUS, F.STATUS_DT, F.DUE_DT AS F_DUE_DT, F.RESPONSIBLE_ID
FROM PS_ADM_APPL_DATA A
JOIN PS_PERSON_NAME B ON B.EMPLID = A.EMPLID
JOIN PS_PERSON_CHECKLST C ON C.COMMON_ID = A.EMPLID
JOIN PS_ADM_APPL_PROG D ON D.EMPLID = A.EMPLID
AND D.EMPLID = A.EMPLID
AND D.ACAD_CAREER= A.ACAD_CAREER
AND D.STDNT_CAR_NBR= A.STDNT_CAR_NBR
AND D.ADM_APPL_NBR= A.ADM_APPL_NBR
AND D.EFFDT =
(SELECT MAX(D2.EFFDT) FROM PS_ADM_APPL_PROG D2
WHERE D.EMPLID = D2.EMPLID
AND D.ACAD_CAREER = D2.ACAD_CAREER
AND D.STDNT_CAR_NBR = D2.STDNT_CAR_NBR
AND D.ADM_APPL_NBR = D2.ADM_APPL_NBR
AND D.APPL_PROG_NBR = D2.APPL_PROG_NBR
AND D2.EFFDT <= SYSDATE)
AND D.EFFSEQ =
(SELECT MAX(D3.EFFSEQ) FROM PS_ADM_APPL_PROG D3
WHERE D.EMPLID = D3.EMPLID
AND D.ACAD_CAREER = D3.ACAD_CAREER
AND D.STDNT_CAR_NBR = D3.STDNT_CAR_NBR
AND D.ADM_APPL_NBR = D3.ADM_APPL_NBR
AND D.APPL_PROG_NBR = D3.APPL_PROG_NBR
AND D.EFFDT <= D3.EFFDT)
JOIN PS_CS_CHKLST_TBL E ON E.CHECKLIST_CD = C.CHECKLIST_CD
AND E.EFFDT = (SELECT MAX(E2.EFFDT) FROM PS_CS_CHKLST_TBL E2 WHERE
E2.INSTITUTION = E.INSTITUTION AND E2.CHECKLIST_CD = E.CHECKLIST_CD)
AND E.EFF_STATUS = 'A'
JOIN PS_PERSON_CHK_ITEM F ON F.COMMON_ID = C.COMMON_ID
AND F.SEQ_3C = C.SEQ_3C
JOIN PS_SCC_CKLSITM_TBL G ON G.CHKLST_ITEM_CD = F.CHKLST_ITEM_CD
AND G.EFF_STATUS = 'A'
AND G.EFFDT = (SELECT MAX(G2.EFFDT) FROM PS_SCC_CKLSITM_TBL G2 WHERE
G2.CHKLST_ITEM_CD = G.CHKLST_ITEM_CD)
JOIN PS_TERM_TBL H ON H.INSTITUTION = E.INSTITUTION
AND H.ACAD_CAREER = A.ACAD_CAREER
我希望得到任何帮助。谢谢!
答案 0 :(得分:3)
在App Designer中对记录进行建模时:您在选择SQL中的记录定义中是否有相同数量的字段? 这些必须匹配,否则在App Designer中构建时会出现此错误。
答案 1 :(得分:0)
看起来好像你从之前的一个版本中取了create view some_view (col1, col2, ..., coln) as
,修改了你发布的select
语句(添加或删除了一些列),并且 - 一旦你把它粘在一起 - 列的数量没有不再匹配了。
最简单的方法是让Oracle这样做,即不要命名列:
create view some_view as
select <your select goes here>
但是,请注意列名select
返回;你不能拥有像
select max(some_value), --> this - must have an alias
my_name
因为列查询返回必须有别名。