this command should get your data moved to a new sql table

insert into table2
select (concat(mid(my_date,7,4),'-',mid(my_date,1,2),'-',mid(my_date,4,2)))
from table1;

- hcir

On Tuesday, January 28, 2003, at 01:45 PM, Wong Zach-CHZ013 wrote:

Hi
I have a few tables in a database Z, namely
table
a
b
c

In table a, the columns are
my_date - longtext
num - int(11)

eg:
mysql> select * from a;
+----------+------+------+
| my_date       | x    |
+------------------+------+
| 08/06/2002   |    1 |
| 08/07/2002   |    2 |
+----------+------+------+
2 rows in set (0.00 sec)

Tables b and c have the same table structure and data type format.

Q:
How do I convert 08/06/2002 to 2002-08-06 format
without having to reinput all my data from scratch ?

---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to