我正在使用hibernate命名查询,我面临的问题是预期的位置参数计数。 我正在提供查询
<query><![CDATA[
SELECT
UCN.UCN_FIRST_NAME "FIRST NAME"
,UCN.UCN_LAST_NAME "LAST NAME"
,UCN.UCN_EMAIL_ID "E-MAIL ID"
,UCN.UCN_PEOPLESOFT_ID "PEOPLE SOFT ID"
,UCN.UCN_USER_ID "LAN ID"
,DECODE(UCN.UCN_LOCKED_IND
,'Y','Yes'
,'N','No'
,NULL
) "IS THE USER LOCKED?"
,(SELECT
LISTAGG(LAS1.LAS_CONTEXT_LOCALE_NAME,', ') WITHIN GROUP (ORDER BY URL.UCN_ID)
FROM
ET2_OWNER.USER_ROLE URL
,ET2_OWNER.LANGUAGE_ASSOCIATION LAS1
WHERE UCN.UCN_ID = URL.UCN_ID
AND LAS1.LAS_CONTEXT_ID = URL.ARL_ID
AND LAS1.LAN_ID = :LAN_ID
AND LAS1.CON_ID = :CON_ID
AND LAS1.LAS_CONTEXT_CODE = :LAS_CONTEXT_CODE
GROUP BY URL.UCN_ID
) "NON-PRODUCT SPECIFIC ROLE"
,DECODE(UCN.UCN_PROXY_USER_IND
,'Y','Yes'
,'N','No'
,NULL
) "HAS PROXY USER PRIVILEGE?"
,DECODE(UCN.UCN_CAN_TRANSACT_CST
,'Y','Yes'
,'N','No'
,NULL
) "TRANSACT WITHOUT CST?"
,DECODE(UCN.UCN_REVIEWER_FLAG
,'Y','Yes'
,'N','No'
,NULL
) "IS A PEER REVIEWER?"
,(SELECT
LISTAGG(PRD.PRD_PRODUCT_CODE
||' --> '||DECODE(UPT.UPT_COMP_LEVEL
,'H','High'
,'L','Low'
,UPT.UPT_COMP_LEVEL
)
||' --> '||LAS.LAS_CONTEXT_LOCALE_NAME,', '||CHR(13))
WITHIN GROUP (ORDER BY PRD.PRD_PRODUCT_CODE)
FROM
ET2_OWNER.USER_PRODUCT UPT
,ET2_OWNER.LANGUAGE_ASSOCIATION LAS
,ET2_OWNER.PRODUCT PRD
WHERE UCN.UCN_ID = UPT.UCN_ID
AND LAS.LAS_CONTEXT_ID = UPT.ARL_ID
AND PRD.PRD_ID = UPT.PRD_ID
AND LAS.LAN_ID = :LAN_ID
AND LAS.CON_ID = :CON_ID
AND LAS.LAS_CONTEXT_CODE = :LAS_CONTEXT_CODE
GROUP BY UPT.UCN_ID
) PRODUCT_SPECIFIC_ROLE
,PRC.PCT_PRACTICE_NAME PRACTICE
,REG.RGN_REGION_NAME REGION
,OFF.OFF_OFFICE_NAME OFFICE
,UCN.UCN_LAND_PHONE_NUMBER "PHONE NUMBER"
,'ENGLISH-GREAT BRITAIN' "LANGUAGE"
FROM
ET2_OWNER.USER_CONTACT UCN
,ET2_OWNER.USER_OFFICE UOF
,ET2_OWNER.OFFICE OFF
,ET2_OWNER.REGION REG
,ET2_OWNER.PRACTICE PRC
WHERE UCN.UCN_USER_TYPE = :UCN_USER_TYPE
AND UCN.UCN_STATUS = :UCN_STATUS
AND UCN.UCN_ID = UOF.UCN_ID
AND UOF.OFF_ID = OFF.OFF_ID
AND OFF.RGN_ID = REG.RGN_ID
--AND REG.RGN_REGION_NAME in ('Central','South')
AND UCN.UCN_EMAIL_ID NOT IN ( 'abc"gmail.com','cba@gmail.com','b@gmail.com'
,
,'ji.f@yahoo.com'
)
)
]]></query>
这是我的查询,我将此代码用于数据填充
Query query = entityManager.createNamedQuery(QueryNames.FIND_ACTIVE_MARSH_USER.value());
query.setParameter("LAN_ID", "en-gb");
query.setParameter("CON_ID", "GB");
query.setParameter("LAS_CONTEXT_CODE", "ARL");
query.setParameter("UCN_USER_TYPE", "M");
获得此异常
Expanded non LONG bind data supplied after actual LONG or LOB column.
答案 0 :(得分:0)
:未绑定UCN_STATUS参数。
同意,错误消息不清楚,但这是当参数未绑定或与null