command -(Alter table
alter column ...)
Can I change data type from datetime to bigint
as it is giving me error
Disallowed implicit conversion from data type datetime to data type bigint
Here's how I would do this. (There may be a better way)
1. Add a new column to the table of type BigInt
2. Update the column: Update Table Set MyNewField = convert(bigInt, MyDateField)
3. Drop the old column
4. Create the column with type BigInt
5. Copy data from Temp Column to Original Column
6. Drop the temp column table
-George
Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.