Support Article
Generation of big query with UNION ALL
Summary
When viewing the Audit tab for a Work Object the system administrator has observed that this is building a SQL statement, which includes UNION ALL clauses which are querying tables that are unrelated to the current case type.
For example: -
select pxObjClass as "pxObjClass", pxCoverInsKey as "pxCoverInsKey", pzInsKey as "pzInsKey", pyStatusWork as "pyStatusWork", pyID as "pyID" from PRPC718DATA.pc_Work_ProcessEmail where pxCoverInsKey = ?
UNION ALL
select pxObjClass as "pxObjClass", pxCoverInsKey as "pxCoverInsKey", pzInsKey as "pzInsKey", pyStatusWork as "pyStatusWork", pyID as "pyID" from PRPC718DATA.pc_work where pxCoverInsKey = ?
UNION ALL
select pxObjClass as "pxObjClass", pxCoverInsKey as "pxCoverInsKey", pzInsKey as "pzInsKey", pyStatusWork as "pyStatusWork", pyID as "pyID" from PRPC718DATA.pc_MyTest_FW_GenericAppFW_Work where pxCoverInsKey = ?
UNION ALL
select pxObjClass as "pxObjClass", pxCoverInsKey as "pxCoverInsKey", pzInsKey as "pzInsKey", pyStatusWork as "pyStatusWork", pyID as "pyID" from PRPC718DATA.pc_work_dms where pxCoverInsKey = ?
UNION ALL
select pxObjClass as "pxObjClass", pxCoverInsKey as "pxCoverInsKey", pzInsKey as "pzInsKey", pyStatusWork as "pyStatusWork", pyID as "pyID" from PRPC718DATA.pc_Mysi_FW_CustomSIPFW_Work where pxCoverInsKey = ?
UNION ALL
select pxObjClass as "pxObjClass", pxCoverInsKey as "pxCoverInsKey", pzInsKey as "pzInsKey", pyStatusWork as "pyStatusWork", pyID as "pyID" from PRPC718DATA.pc_work_accel where pxCoverInsKey = ?
UNION ALL
select pxObjClass as "pxObjClass", pxCoverInsKey as "pxCoverInsKey", pzInsKey as "pzInsKey", pyStatusWork as "pyStatusWork", pyID as "pyID" from PRPC718DATA.pc_MyTest_FW_DataPageFW_Work where pxCoverInsKey = ?
Error Messages
Not Applicable.
Steps to Reproduce
1. Open a work object.
2. Start Tracer and ensure that the DB Query event is being traced.
3. Return to the work object and click on the Audit tab.
Root Cause
This was identified as a defect in the core code.
Resolution
Apply HFix-27952.
Published June 17, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.