→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
wesselvanerp
Engaged Sweeper
Hi,

I want to filter out certain assetnames that have specific structure (first two letters, then 6 numbers). I want to use regex for this, but I can't get it to work. I'm sure my regex works (verified it at https://regexr.com/), but when I use it in a report query, it doesn't work. I used the following clause:

Where tblAssets.AssetName Like '^UI\d{6}$'

Can anybody tell me what is going wrong?

Thank you in advance!
1 REPLY 1
Joshua
Engaged Sweeper III
I have tons of custom reports that don't work in the editor. What I do is create a new report with the default select statement and save it with whatever name I want.

This will create a view in the Lansweeper database and the name of the view is in the URL of the report such as: https://XXXXXXXXXXX/Report/editreport.aspx?det=web50rep7b10f76f50bd493ca4079b7ac525999e&title=Test%20Report

Then I go into the SQL database, right click the view, then select design. This lets me change the SQL query to whatever it is I want. SQL Server Management Studio will allow you to make the view as complicated as you like and when you're done, just save the view. Then the report should load normally on the website.






New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now