I am able to extract the bold data in this example using a substring case statement:
When REPLACE(REPLACE(REPLACE(LTRIM(SUBSTRING(ah.TokenString,70,2)),CHAR(0x09),''),CHAR(0x04),''),CHAR(0X05),'') = '23' AND REPLACE(REPLACE(REPLACE(LTRIM(SUBSTRING(ah.TokenString,79,2)),CHAR(0x09),''),CHAR(0x04),''),CHAR(0X05),'') = '64' AND Left(ah.TokenString,1) = '9' AND ah.TransactionType In ('VPA','VCA','VCR') Then REPLACE(REPLACE(REPLACE(LTRIM(SUBSTRING(ah.TokenString,73,5)),CHAR(0x09),''),CHAR(0x04),''),CHAR(0X05),'')
Although the data that I'm trying to retrieve is always between the 23 and the 64, it's not always in the same spot.
How can I just extract the data between the 23 and 64 regardless of where it's at in the string?
Thanks.