cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Perkins
Engaged Sweeper
I am "tring" to create a report that tells me which computers/users have ITunes installed. I can build the report and run it and everything looks fine but when I go to save the report I get an error.

Error:

the Order By clause is invalid in views, inline functions, derived tables, subquiers, and common table expressions, unless Top or FOR XML is also specified.

What does that mean....

FYI... I am just starting to use SQL..


Report:

SELECT DISTINCT
dbo.tblSoftware.softwareName AS Software,
dbo.tblSoftware.softwareVersion AS Version,
dbo.tblSoftware.Installdate,
tblADusers.Name,
tblADusers.Userdomain,
tblADComputers.Computername
FROM
tblADComputers
INNER JOIN tblADusers ON (tblADComputers.Company = tblADusers.Company)
INNER JOIN dbo.tblSoftware ON (tblADComputers.Computername = dbo.tblSoftware.ComputerName)
WHERE
dbo.tblSoftware.softwareName LIKE '%ITune%'
ORDER BY
dbo.tblSoftware.ComputerName

Thanks!
1 REPLY 1
Hemoco
Lansweeper Alumni
You will need to add the "top 100 percent" clause

select top 100 percent