Forum Moderators: open
I already do a conversion on my database(Mssql) to mysql.
The problem is some on the datatype no compatible with mysql.
For example bit(mssql)[TRUE/FALSE] ---> tinyint(mysql)[1/0].
This is not successful. In mysql, there is no datatype for TRUE and FALSE. Any suggestion? What datatype I should use?
Not sure what you are using to convert the data, but if you're exporting from MSSQL to a file and then importing into MySQL then you should be able to export all BIT values of TRUE as a 1 and all BIT values of FALSE as a 0. And then import them into a MySQL TINYINT(1) or BOOL/BOOLEAN or BIT(1) field directly.
For example, if in MSSQL you have a table called MyTable with a field called MyBitField you should be able to export the table similar to the following:
SELECT
CASE MyBitField
WHEN true THEN 1
ELSE 0
END , field2, field3
FROM MyTable
[edited by: ZydoSEO at 1:57 pm (utc) on Aug. 12, 2008]