This answer does not specifically apply to SQL, but it does apply to street addresses.
If you are willing to take a dependency on a third-party, you could send street addresses to the SmartyStreets International Street API service.
To do this, you submit an HTTP GET
request.
Your example address would look like this:
curl -v 'https://international-api.smartystreets.com/verify?
auth-id=YOUR+AUTH-ID+HERE&auth-token=YOUR+AUTH-TOKEN+HERE&
address1=Dr%20Robert%20Ruberry%2C%20West%20End%20
Medical%20Practice%2C%2038%20Russell%20Street%2C%20
South%20Brisbane%204101
&country=aus'
(Notice that the address is url encoded. The request is wrapped for readability.)
The response would be a JSON
string, separated into components that you can then insert into your database however you need to:
[
{
"organization": "Dr Robert Ruberry, West End Med.",
"address1": "Dr Robert Ruberry, West End Med.",
"address2": "Russell Street",
"address3": "38 Practice",
"address4": "South Brisbane QLD 4101",
"components": {
"administrative_area": "QLD",
"building": "Russell Street",
"country_iso_3": "AUS",
"locality": "South Brisbane",
"postal_code": "4101",
"postal_code_short": "4101",
"thoroughfare": "Practice",
"thoroughfare_name": "Practice",
"sub_building_number": "38"
},
"metadata": {},
"analysis": {
"verification_status": "Partial",
"address_precision": "Locality",
"max_address_precision": "DeliveryPoint"
}
}
]
An added benefit is that the service provides you with extra information about the validity of the address.
(Disclosure: I work at SmartyStreets.)