MySQL Forums
Forum List  »  Newbie

return string after the first space
Posted by: Chad Ledden
Date: July 26, 2015 09:19PM

I have a table called tblCustomers
Some of the fields are:
Name
Address
PhoneNumber

Some sample data:
Name: John Smith
Address: 10 Example Lane Sydney
PhoneNumber: 02 33331111

Name: Mary Smith
Address: 12 Example Lane Sydney
PhoneNumber: 0243331111

Name: Bob Smith
Address: 18 Example Lane Sydney
PhoneNumber: 02 5333 1111

I need help with obtaining the PhoneNumber, so that it only displays the phone number after the 1st space

For eample:
John Smith phone number would display as 33331111
Mary Smith phone number would display as 0243331111
Bob Smith phone number would display as 5333 1111

My current code is:
use myDatabase;
Select Name, PhoneNumber
from tblCustomers;


Thanks for you help

Options: ReplyQuote


Subject
Written By
Posted
return string after the first space
July 26, 2015 09:19PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.