cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Hemoco
Lansweeper Alumni

' This is a sample report that shows all installed microsoft software
' Always start the name of your views with "web30rep"

'Create the view

CREATE VIEW dbo.web30repmicrosoftsoftware
AS
SELECT DISTINCT TOP 100 PERCENT softwareName as Software, softwareVersion as Version, SoftwarePublisher as Publisher
FROM dbo.tblSoftware
WHERE (SoftwarePublisher LIKE '%microsoft%')
ORDER BY softwareName

GO

'Add the view to the reports table

INSERT INTO [tsysreports] ([Reportquery],[Reporttitle]) VALUES ('web30repmicrosoftsoftware','All Microsoft software')

GO

'Add the report to the software reports page

INSERT INTO dbo.tsysreportsoftware
(HomepageQuery, Sortorder, Priority, Showcolor, Showpercentage)
VALUES ('web30repmicrosoftsoftware', 1000, 3, 0, 0)
2 REPLIES 2
Hemoco
Lansweeper Alumni
In which program did you copied this text?
ratiopharm
Engaged Sweeper
I get

Error in ORDER BY clause.
Unable to parse query text.

I copied the text from the web to notepad and copied again from notepad to new view , after clicking OK I get a SQL execution error

error source : .Net SqlClient Data Provider
error messssage: Incorrect Syntax near 'GO'