473,395 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Converting an empty Varchar field to Date field for a column in MYSQL

Can anyone please help me with the following.

I have an empty Varchar column for one table. I need to convert the datatype to date now. But i need the field to be empty. How can this be done.

When i tired ALTER TABLE TBL_PURCHASE_ORDER
MODIFY PO_SUGG_SHIP_DT DATE;

Its giving me the following error Incorrect date value: ' ' for column 'PO_SUGG_SHIP_DT' at row ...


I had loaded the data in .csv format to mysql.

Please help
Thanks in Advance
Mar 30 '07 #1
2 1597
Give this a try, hopefully it will resolve your problem:-

ALTER TABLE TBL_PURCHASE_ORDER
MODIFY PO_SUGG_SHIP_DT DATE NULL;
Mar 30 '07 #2
Give this a try, hopefully it will resolve your problem:-

ALTER TABLE TBL_PURCHASE_ORDER
MODIFY PO_SUGG_SHIP_DT DATE NULL;

Thanks A LOT! It worked!
Apr 2 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Erik R.N. | last post by:
Hi I have a ACCESS2002 table with a date-field in format "dd-mm-yyyy" which I "export" to a txt-file ( ; and " " ) and upload the txt-file to a MYSQL-table where the datefield is a varchar-field....
3
by: usenet | last post by:
I have inherited a table where date information was saved from PHP as a VARCHAR. (Sigh.) This means that the so-called date fields look like this : August 1, 2005, 9:09 am EDT October 13, 2004,...
3
by: pw | last post by:
Hello, How can I typecast a date generated from VARCHAR fields into a date field ie: UPDATE inventory SET date_field = vc_year||'-'||vc_month||'-'||vc_day;
2
by: mark | last post by:
I have come across a problem that has me baffled. I am using PHP with MySQL 4.1.14. Whenever I execute an update statement against a specific table, some of the varchar fields do not get set to...
4
by: Dan Lewis | last post by:
I've imported a ms access database into a table in a mysql database. The access database contains a field that holds date/time values in 'general date' format. These all show up at 01/01/1970 in...
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
5
by: Patti | last post by:
I am struggling with converting a certain varchar column into an int. I have a table that has 2 fields - one field holds the loan number and the other field holds the codes associated with that...
0
Krishna Ladwa
by: Krishna Ladwa | last post by:
In Sql Server 2000 Version, I found that no Notification message box appears when converting text column to varchar but the data gets truncated to the given size for the varchar. Whereas it appears...
4
by: ll | last post by:
My data input page uses a id generator which includes dashes, and the corresponding column in the db is set up as varchar to handle that. There is a problem, however, when the value in the varchar...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.