
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2020 10:00 PM
I have a SubQuery (SubQuery1.Value) that produces the string 'Windows 10 Enterprise v1903', however I only want 1903 to show in the report.
Any assistance would be appreciated!
SubQuery1.Value As Image
Any assistance would be appreciated!
Labels:
- Labels:
-
Report Center
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2020 10:36 PM
Take a look at the SQL string functions.
In particular, you should be able to use CharIndex() to find your fingerprint/preceding text and then Right() and Len() to isolate the rest of the string.
e.g.
You want to everything to the right of that "e" plus the next two characters, space and "v", so Len() - CharIndex() - 2.
In particular, you should be able to use CharIndex() to find your fingerprint/preceding text and then Right() and Len() to isolate the rest of the string.
e.g.
SELECT Right(SubQuery1.Value, Len(SubQuery1.Value) - CharIndex('e v', SubQuery1.Value) - 2)Given your source text as example,
Windows 10 Enterprise v1903
....:....1....:....2....:..
Len(SubQuery1.Value)returns 27, the length of the source text.
SELECT CharIndex('e v', SubQuery1.Value)returns 21, the position of the "e" where "e v" was found.
You want to everything to the right of that "e" plus the next two characters, space and "v", so Len() - CharIndex() - 2.
