On Aug 4, 2009, at 5:44 PM, Craig White wrote:
I need to update almost all (but not quite all) records in a data
table
because the dates were imported like '08/04/09' instead of
'2009-08-04'
I am looking at the mysql reference manual but it doesn't appear
that it
would be easy to script
On Tue, 2009-08-04 at 16:41 -0700, JD Austin wrote:
> If the current column was a date type there had to be a ton of
> failures!
> If you have unique values in the data you can just craft update
> statements from the csv file. Use excel/OO Calc, perl, etc to parse
> apart the original file to creat
If the current column was a date type there had to be a ton of failures!
If you have unique values in the data you can just craft update statements
from the csv file. Use excel/OO Calc, perl, etc to parse apart the original
file to create update table statements that you can pipe back to mysql afte
On Tue, 2009-08-04 at 16:21 -0700, JD Austin wrote:
> http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
> You can use Str_to_date to convert it to a date.
> Date/timestamp data should be one of the date types (Datetime, date,
> timestamp).
> I'd do it like this (all sql and won't
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html*
You can use Str_to_date to convert it to a date.
*Date*/*timestamp data should be* *one of the date types (Datetime, date,
timestamp).
I'd do it like this (all sql and won't lose data):
1. Add a column to the table that is dat
On Tue, 2009-08-04 at 16:05 -0700, Austin William Wright wrote:
> Craig White wrote:
> > I need to update almost all (but not quite all) records in a data table
> > because the dates were imported like '08/04/09' instead of '2009-08-04'
> >
> > I am looking at the mysql reference manual but it does
On Tue, 2009-08-04 at 15:46 -0700, Eric Cope wrote:
> how many tables?
>
> On Tue, Aug 4, 2009 at 3:44 PM, Craig White
> wrote:
> I need to update almost all (but not quite all) records in a
> data table
> because the dates were imported like '08/04/09' instead of
>
Austin William Wright wrote:
> [...]
> Replace all instances of tablename and columnname with the targets, and
> change DATE NOT NULL as necessary. That should work.
Whoops, Thunderbird formatted my fonts for me, ignore the pipes (wysiwyg
fail):
ALTER TABLE `tablename` CHANGE `columnname` `columnna
Craig White wrote:
> I need to update almost all (but not quite all) records in a data table
> because the dates were imported like '08/04/09' instead of '2009-08-04'
>
> I am looking at the mysql reference manual but it doesn't appear that it
> would be easy to script a line by line 'update' from
how many tables?
On Tue, Aug 4, 2009 at 3:44 PM, Craig White wrote:
> I need to update almost all (but not quite all) records in a data table
> because the dates were imported like '08/04/09' instead of '2009-08-04'
>
> I am looking at the mysql reference manual but it doesn't appear that it
> w
I need to update almost all (but not quite all) records in a data table
because the dates were imported like '08/04/09' instead of '2009-08-04'
I am looking at the mysql reference manual but it doesn't appear that it
would be easy to script a line by line 'update' from a csv file.
Now I still hav
11 matches
Mail list logo