IBM Support

"SQL0811N The result of a scalar fullselect, SELECT INTO statement, or..." error when importing company structures (or performing a database optimise)

Troubleshooting


Problem

User clicks 'Transfer - Import Structures'. User browses to a structure file (which contains company structures) and imports them. An error appears.

Afterwards, user clicks 'Maintain - database - optimise'. User performs a database optimise. A similar error appears.

Symptom

Importing structures:

image-20180711154251-1

Generating company structure...

Database Optimise:

image-20180711154351-2

Regenerating Company Structures...

Standard Error

Error Details
Number: 5
Source: FrangoDirect.GenCompStrucD.GenKStruc#System.Web.Services
Description: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: [DB2/NT64] SQL0811N The result of a scalar fullselect, SELECT INTO statement, or VALUES INTO statement is more than one row. SQLSTATE=21000

Cause

Limitation of Controller which only occurs under very rare (exceptional) circumstances.

 

More Information:

The problem could occur if the customer modifies their company structure in the following order:

1.  Moves the company down, and inserts it (for a short time) under a specific group which has different method

2. Then move the company back to where it was initially, and simultaneously the group is disconnected.

 

Example:

In one real-life customer example, the relevant group was disconnected (from the structure) 8 years previously, and therefore it was of no interest for current periods. The past periods (up to 8 years ago) are therefore available for reporting, consolidated (with structures valid back then) and locked at that time.

Environment

Problem only affects DB2 (does not affect SQL).

Resolving The Problem

Fix:

Modify the consolidation method for the relevant group.

 

Example Steps:

In one real-life customer example, the workaround was:

1. Logon to the 'source' (SQL) database

2. Modify the consolidation method for the relevant group (in the relevant consolidation type) from "W" to "P" by performing the following:

  • Click "Maintain/Company Structure/Define" for the relevant period
  • Choose button "Edit group connection" for this group and change the consolidation method from W to P
  • Save your changes then wait for a new generation of company structure, which might take some time.

3. Then proceed with exporting the company structure (from the source SQL database)

4. Now importing those structures inside the target (DB2) database.

- This time there will be no error.

NOTE: You should not change back from P to W once you have successfully imported in DB2 database because you would receive the same error message as before (next time when the structure is generated).

 

For this customer, the workaround was acceptable because the problem only affects periods which are no longer reported

 

- In other words, the relevant group was disconnected (from the structure) 8 years previously, and therefore it was of no interest for current periods.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS9S6B","label":"IBM Cognos Controller"},"Component":"","Platform":[{"code":"PF033","label":"Windows"}],"Version":"10.3.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
23 July 2018

UID

ibm10716975