Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Does your db have a bulk loading utility? Do you have access to text manipulation tools such as awk?
If so, using them is probably a better idea than using ColdFusion.
Copy link to clipboard
Copied
good idea!. I just imported the data into excel and split the columns there and then just inported it back. Thanks alot!