"Product Compliance History By OU" displays bad data

Version 1

    Details

    The OOTB "Product Compliance History By OU" report is displaying data from 2011. It is junk data. How do we clean this up?


    Resolution

    Those values are default out of the box items.  Before you ever delete anything from the tables make sure you test results thoroughly in development and have a good backup of the DB.  


    If you want to get rid of these, run the following in SQL to drop these values from the table.  The below assumes each item you want to get rid of was created in 2011, so you may need to double check the values in the table as below before actually deleting them.  Also, do this in development with the DB backed up prior to ever running a DELETE statement in SQL just in case something goes wrong.

    --Check Demo Values in Compliance Table:--

    SELECT * FROM [dbo].[FRS_LM_ProductComplianceSummary]


    --Delete Demo data items from table with CreatedDateTime of 2011:--

    DELETE FROM [dbo].[FRS_LM_ProductComplianceSummary]
    WHERE CONVERT(VARCHAR(23),CreatedDateTime,120) LIKE '2011%'

    Lastly, these Compliance values are related to the SoftwareProduct values that are also demo data. 

    --If you want to do a comparison, run the following:--

    SELECT * FROM [dbo].[FRS_LM_SoftwareProduct]
    WHERE CONVERT(VARCHAR(23),CreatedDateTime,120) LIKE '2011%'

    --And again to remove the demo SoftwareProducts:--

    DELETE FROM [dbo].[FRS_LM_SoftwareProduct]
    WHERE CONVERT(VARCHAR(23),CreatedDateTime,120) LIKE '2011%'