Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ngebhar2
Engaged Sweeper II
Hello,
I'd like to make a report that pulls out a substring of the FTP header. My current report pulls tblAssetCustom.FTPheader but I'd like to get a version number out of it. The version number doesn't always appear at the same index for each asset so I don't think I can do a plain substring.

Example:

[220 silex SX-3000GB Ver 1.1.3 FTP server], note: brackets are not part of the string, I want to have "1.1.3" in the report.

If this was .NET or Powershell I would do something like this:
[regex]::Match("220 silex SX-3000GB Ver 1.1.3 FTP server","\d\.\d\.\d").value

But alas I'm still at a basic SQL level so I'm not sure if this can be done in Lansweeper.

Thanks in advance either way.
1 REPLY 1
ngebhar2
Engaged Sweeper II
Well I found a "workaround" for anyone that has a similar issue.

I used a combination of SUBSTRING and CHARINDEX to find Ver in the string and then grab the next 9 characters:

220 silex SX-3000GB Ver 1.1.3 FTP server

using SUBSTRING( tblAssetCustom.FTPheader, CHARINDEX('Ver' , tblAssetCustom.FTPheader), 9 )

turns into Ver 1.1.3

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

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

Try Now