Samila Mohd Zain Samila Mohd Zain - 1 year ago 138
SQL Question

To get partial character

jitter (Index: 1200) to 223.28.1.xxx ;
jitter (Index: 900) to 223.28.0.xx ;
jitter (Index: 700) to 223.28.1.xxx ;


How do I get partial character that starts from '223 until end' ?
Currently, I am using the substring (resource_name,24), but my solution is not suitable as it unable to fulfill all new requirements.

Answer Source

Use substring with position(substring in string) It tells the position of the 223 in your string. More info in PostgresSQL Documentation

Like this:

SELECT substring(resource_name, poisition('223' in resource_name))
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download