At 16:23 -0500 6/12/03, Wong Zach-CHZ013 wrote:
Hi
1 - I have a column whose datatype is longtext. Its content is 08/06/2003;
I created a new column whose datatype is DATE. Its content is null now.
How do write a SQL statement that
inputs each row from 08/06/2003 in the
old column to 2003-08-06 in a new column ?

Eg:
old column name - my_date
new column name - my_new_date

I tried
 select CONCAT(SUBSTRING(MY_DATE FROM 7),
'-',SUBSTRING_INDEX(MY_DATE,'/',1), '-', MID(MY_DATE,4,2)) from dap_cell;

But how do I put this value into its corresponding row in the new column ?

UPDATE dap_cel SET my_new_date = CONCAT(that-long-expression-above);



Any help is appreciated.


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to