Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 16th, 2005, 05:32 PM
Authorized User
 
Join Date: Feb 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to IronStar
Default Problem importing dates

Hi all,

I'm trying to import a date from a text file in YYYYMMDD format as an integer and MySQL is loading it as '0000-00-00'. I recently upgraded to version 4.1.10a, but previous versions loaded this without a problem.

Here is the load script I am using:

LOAD DATA LOCAL INFILE "c:/users.txt"
INTO TABLE users
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"';

and here is a sample text record:

"USERNAME",3,"PASSWORD",99,"FIRSTNAME","LASTNAME", T,"A",1,19910827

The date 19910827 is loaded as 0000-00-00, but earlier 4.0.x versions of MySQL loaded it as '1991-08-27'.

Does anyone know why this is happening?

Thanks,
Tom





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem importing namespace netsu ASP.NET 1.0 and 1.1 Basics 1 March 16th, 2007 02:03 PM
Problem importing CSV hman MySQL 0 January 6th, 2007 09:13 AM
importing from flat file PK problem olambe Classic ASP Databases 3 October 18th, 2004 04:09 PM
Problem importing data into a TEXT field seansheds SQL Server DTS 1 August 19th, 2004 02:52 PM
Problem importing text file manuel Access 3 April 7th, 2004 09:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.