weightinwildcat
Programmer
I am trying to tke letters out of some alphanumeric strings in a MySQL table. Right now I have code to query my table and write the results into a tab-delimited text file. The problem somes in when I try to use SUBSTR and other related functions to get rid of the letters.
Here is what part of a column might look like:
1000
W200
1300E
N1235S
N3N10200
I am trying to shave off any trailing letters or preceding letters. For those entries that look like N3W10200 I would like to be able to use Explode to get the numerical values and add them, but I need to be able to use the string functions effectively. Any thoughts as to what I am missing?
The output would look like this:
1000
200
1300
1235
10203
Have a great day.
Here is what part of a column might look like:
1000
W200
1300E
N1235S
N3N10200
I am trying to shave off any trailing letters or preceding letters. For those entries that look like N3W10200 I would like to be able to use Explode to get the numerical values and add them, but I need to be able to use the string functions effectively. Any thoughts as to what I am missing?
The output would look like this:
1000
200
1300
1235
10203
Have a great day.