Notifications

121 views

Description

When a list has been grouped by, the number of records in the list does not match the number of records in the SQL statement.

Steps to Reproduce

 

  1. Log in to the instance.

  2. Enable Debug SQL (detailed).

  3. Type cmdb_ci.list in the search box.

  4. Group the list retrieved on Manufacturer.

  5. Make a note of the number of items.

  6. Search for "Group By" in the logs and locate the following statement:

    SELECT ... FROM (cmdb_ci cmdb_ci0 LEFT JOIN core_company core_company1 ON cmdb_ci0.`manufacturer` = core_company1.`sys_id` ) GROUP BY cmdb_ci0.`manufacturer`,core_company1.`name` ORDER BY core_company1.`name` 7)

  7. Execute the following statement in Scripts-Background (note the change in number at the end):

    SELECT count(*) FROM (cmdb_ci cmdb_ci0 LEFT JOIN core_company core_company1 ON cmdb_ci0.`manufacturer` = core_company1.`sys_id` ) GROUP BY cmdb_ci0.`manufacturer`,core_company1.`name` ORDER BY core_company1.`name` 8).

  8. Paste the result retrieved into an Excel spreadsheet.

    Observe the number of records in the spreadsheet.

Workaround

No workaround is available at this time. 


Related Problem: PRB623525

Seen In

Dublin Patch 1

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-04-12 10:03:13
Published:2016-11-08