< class="prominent-subhead ">

Code Fix: An error occurs when executing an SQL query using "Union All" with tables that have the same name

~~repeating-content.html~~
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue Description

Executing an SQL query using tables with the same name and using a ‘UNION ALL’ operator causes an object reference error.

Error Message

Object reference not set to an instance of an object

Resolution

  1. Ensure you have K2 4.7 installed.
  2. Download and Install the K2 4.7 March 2018 Cumulative Update from K2 Partner and Customer Portal.
  3. Get the K2 4.7 March 2018 Cumulative Update FP6 from Regional Support.
  4. Install the K2 4.7 March 2018 Cumulative Update FP6 to apply the fix.