Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Query to delete some characters from a column


Jstanfield - 1:59 pm on Nov 15, 2011 (gmt 0)


see documentation for substring_index function
[dev.mysql.com...]

select substring_index(your_field,'-',2)
from your_table

update your_table set your_field=substring_index(your_field,'-',2)


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4387135.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com