SQL Update to split 1 column into 2
I have a column in a table that holds both a city and a zip ex. Jackson 44319
I am trying to write an sql update query so that the 2 pieces of info would be split and funneled into their own respective column. For example:
Before
column name: address
Jackson 44319
After
column name:city column name: zip
Jackson 44319
Here is what I have come up with so far, but it does not work correctly.
Update Table
Set city=Parsename(Replace(address ,',','.'),2),
zip=Parsename(Replace(address ,',','.'),1)
this query basically copies all my info from the address table and puts it into the zip table, and the city table remains null. yet, nothing gets split.
