Hi there,
I am busy converting a MSSql database creation script to a MySQL database creation script.
Everything is going reasonably well except I can't get MySQL to make the following work.
CREATE TABLE tTasksMy (
intTaskID int IDENTITY (1, 1) NOT NULL PRIMARY KEY,
vchTaskDesc text NULL
)
MySQL complains about the IDENTITY (1,1) bit. Anyone have any ideas ?
Thanks
Jmysql uses auto_increment instead
read more here: 3.6.9 Using AUTO_INCREMENT (http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html)|||Thanks ! -- Works like a charm!
Originally posted by r937
mysql uses auto_increment instead
read more here: 3.6.9 Using AUTO_INCREMENT (http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html)sql
Showing posts with label converting. Show all posts
Showing posts with label converting. Show all posts
Wednesday, March 28, 2012
MSSql & MySQL
Monday, March 12, 2012
Msg 242 when converting date from string (date in 'YYYY-MM-DD hh:mm:ss.ms' format)
MS SQL Server 2000 SP4 Spanish
It doesn't accept such values into query, although it shows them in this format.
select * from values where Dt > '2006-06-26 00:00:00.000'
returns with Msg 242,...
What am I doing wrong?
You have me baffled, because it seems to convert fine for me; however, try this in case it is a locale issue:
Code Snippet
select convert (datetime, '2006-06-26 00:00:00.000' , 121)
as explicitConversion
/*
explicitConversion
-
2006-06-26 00:00:00.000
*/
|||Explicit conversion works, but I need to get MS SQL Server to accept dates in this format (ODBC)

Ok, found problem. My fault.
Actually ODBC format requires {ts 'YYYY-MM-DD hh:mms'}, not just time string.
Subscribe to:
Posts (Atom)