I have bulk table imports; one field (LongClass) has data that looks like this. ALW 25000N1X, ALW 5000N3X , ALW 15235s.
What I've wanted to do is find a manner to remove those center numerics so that the LongClass is reduced to ALW N1X, ALW N3X and ALW s respectively upon it's import/conversion into the standard data table. As you can see, the length of that numeric is variable.
The kind person in the past was able to give me this code for a module in Access:
Expand|Select|Wrap|Line Numbers
- Public Function fParseString(strMyString As String)
- Dim varString As Variant
- Dim strPart1 As String
- Dim strPart2 As String
- Dim intCounter As Integer
- varString = Split(strMyString)
- strPart1 = varString(0)
- 'find 1st non-numeric value in the 2nd element, then extract
- 'from that point on
- For intCounter = 1 To Len(varString(1))
- If Not IsNumeric(Mid$(varString(1), intCounter, 1)) Then
- fParseString = strPart1 & " " & Mid$(varString(1), intCounter)
- Exit Function
- End If
- Next
- End Function
Now, I'm just learning MySQL so I'm afraid my ability to converse back and forth would be minimal if there's further questions. But if anyone can look at this and help me figure out what the best way forward is, I'd be happy. Thank you.