Basically, I have to separate the following strings into the correct columns:
'Anna Campbell Flat 9 1153B Great South Road Epsom Auckland 1050'
'Paul Campbell Flat 123 11 Ongly Ave Epsom Auckland 1050'
I figure that all I need to do is declare variables, set each variable to a different part, and insert into the correct columns, I'm just not sure how to tell the DB what each part is.
I have to insert it into the customer_address field, and need to separate it into first_name, last_name, customer_name, street_number, street_name, and customer_address.
All I've got so far are the variables:
declare @firstname varchar(50)
declare @lastname varchar(50)
declare @customername varchar(100)
declare @streetnumber varchar(50)
declare @streetname varchar(50)
declare @customeraddress varchar(50)