I'm trying to run the following SQL script to generate a report of all of the software on machines, organized by machine instead of software. This script worked on the machine where Lansweeper was originally installed but is generating an error when I try to execute the script on the new server.
Script is:
CREATE VIEW dbo.web30softwarereport
AS
Select * from lansweeperdb.dbo.tblsoftware
GO
INSERT INTO [tsysreports]([Reportquery],[Reporttitle]) VALUES ('web30softwarereport','Software Report')
Error is:
There is already an object named 'web30softwarereport' in the database
Violation of PRIMARY KEY constraint 'PK_tsysreports'. Cannot insert duplicate key in object 'dbo.tsysreports'
I didn't see the first error line the first time I ran the script. Thanks in advance for assistance with getting this working.