cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
STRiCT
Engaged Sweeper
I have a SubQuery (SubQuery1.Value) that produces the string 'Windows 10 Enterprise v1903', however I only want 1903 to show in the report.

SubQuery1.Value As Image


Any assistance would be appreciated!
1 REPLY 1
RCorbeil
Honored Sweeper II
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.
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.