Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
robertnzana
Starting Member
42 Posts |
Posted - 2008-05-20 : 12:13:35
|
I imported data into a table. It has City/State together, like this "Miami, FL". How can I "split" the 2 fields and put Miami into the City field and FL into the state field (in the same table)?Thanks. |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-05-21 : 05:46:16
|
select mid(column_name, 1,instr(1,column_name)-1),mid(column_name, instr(1,column_name,',')+1,len(column_name)) from your_tableMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|