hungrykoala hungrykoala - 1 year ago 63
MySQL Question

How to remove some texts from a field during a select query?

I have a field in my table that contains this value:

#3 text For string# 1
#4 Payment For Inv# 5

What I want to do here is to only display "1 and 5" after a select query, and the problem is that #n is not limited to a single digit only thus, I cannot use SUBSTRING.

Any ideas on how to proceed with this?

Answer Source

As 1 and 5 comes at last position of string so you get the last character of string as

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download