cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mhinton433
Engaged Sweeper II
Hi there

I'm trying to run a report to verify that 4 reports have been updated. Now, I have a report that checks one file but not sure of the syntax to add other files to it.

Thanks

Andy

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblFileVersions.Found,
tblFileVersions.FilePathfull,
tblFileVersions.FileVersion,
tblFileVersions.CompanyName,
tblFileVersions.Filesize,
tblFileVersions.Lastchanged
From tblAssets
Inner Join tblFileVersions On tblAssets.AssetID = tblFileVersions.AssetID
Where tblFileVersions.Found = 'True' And tblFileVersions.FilePathfull Like
'%Active Users.pdf' And tblAssets.Assettype = -1
Order By tblAssets.AssetName
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
You can add additional files to the Criteria column of the FilePathfull expression, with the OR operator. This is standard SQL syntax, not specific to Lansweeper. Instead of this...
Like '%Active Users.pdf'

... use something like this:
Like '%Active Users.pdf' or Like '%2nd file.pdf' or Like '%3rd file.pdf' or Like '%4th file.pdf'

To also list machines that are missing one or more files, clear the Criteria column of the Found expression.

View solution in original post

3 REPLIES 3
Susan_A
Lansweeper Alumni
Make sure you are replacing the Like statement in the Criteria column of the expression list, not directly in the SQL query. The change should work without issue.
mhinton433
Engaged Sweeper II
When I do that I get the error:
Invalid SELECT statement. Unexpected token "Like" at line 13, pos 44.: Unexpected token "Like" at line 13, column 44


Susan_A
Lansweeper Alumni
You can add additional files to the Criteria column of the FilePathfull expression, with the OR operator. This is standard SQL syntax, not specific to Lansweeper. Instead of this...
Like '%Active Users.pdf'

... use something like this:
Like '%Active Users.pdf' or Like '%2nd file.pdf' or Like '%3rd file.pdf' or Like '%4th file.pdf'

To also list machines that are missing one or more files, clear the Criteria column of the Found expression.