MySQL Forums
Forum List  »  Microsoft Access

DATETIME Date() Error
Posted by: Leslie Wilson
Date: July 08, 2009 01:04PM

I'm converting Access 2k tables into MySQL using BullZip to create a dump file. I was able to convert 95% of the tables, but when I try to create tables in MySQL with the DATETIME Date() function, I get the following error:

Error
SQL query:

CREATE TABLE `Contacts` (

`Contact_ID` INTEGER NOT NULL AUTO_INCREMENT ,
PRIMARY KEY ( Contact_ID ) ,
`Client_Code` VARCHAR( 10 ) NOT NULL ,
`Main_Contact` TINYINT NOT NULL DEFAULT 0,
`Prefix_Name` VARCHAR( 5 ) ,
`First_Name` VARCHAR( 20 ) ,
`Middle_Name` VARCHAR( 20 ) ,
`Last_Name` VARCHAR( 20 ) ,
`Home_Address_Part1` VARCHAR( 60 ) ,
`Home_Address_Part2` VARCHAR( 60 ) ,
`Home_Address_Part3` VARCHAR( 60 ) ,
`Home_City` VARCHAR( 30 ) ,
`Home_State_Code` VARCHAR( 5 ) ,
`Home_Postal_Code` VARCHAR( 12 ) ,
`Home_Country` VARCHAR( 6 ) ,
`Home_Phone` VARCHAR( 24 ) ,
`Title` VARCHAR( 20 ) ,
`Comment` VARCHAR( 50 ) ,
`E_Mail_Address` VARCHAR( 50 ) ,
`Create_Date` DATETIME DEFAULT 'DATE()'
) ENGINE = MYISAM DEFAULT CHARSET = utf8;



MySQL said:

#1067 - Invalid default value for 'Create_Date'

I know it's probably something simple to resolve since I just want only the "Date" information from the DATETIME field.

Options: ReplyQuote


Subject
Views
Written By
Posted
DATETIME Date() Error
4894
July 08, 2009 01:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.