VentureFree
Well-known member
- Joined
- Jan 9, 2008
- Messages
- 54
- Programming Experience
- 5-10
I have a table with a value stored as a string. It is basically a numeric value with a single letter 'T' injected into the middle of it. Example: '1234T5678'. I'd like to select this value sans 'T' as a Long value. I can do this easily in Access itself using CLng() and Replace(), but this is going to be used in VB.net, and that doesn't seem to recognize the Replace() function. Here's what my select statement looks like in Access:
Is there some equivalent statement that I could use which would work in VB.net? Thanks.
VB.NET:
Select CLng(Replace(MyValue, 'T', '') AS MyValue FROM MyTable WHERE IsNumeric(Replace(MyValue, 'T', ''))