May 21, 2008 at 4:53 am
Hi,
ALTER TABLE table 1
ADD column1 money NUlL DEFAULT '0',
column2 int NUlL DEFAULT '0',
column3 money NUlL DEFAULT '0'
while running this i am getting the below error, Please help
Server: Msg 257, Level 16, State 3, Line 1
Implicit conversion from data type varchar to money is not allowed. Use the CONVERT function to run this query.
Server: Msg 1750, Level 16, State 1, Line 1
Could not create constraint. See previous errors.
May 21, 2008 at 6:53 am
Think a little.
Read error message again.
Look at your statement.
Find where you've got money type declaration and where you're trying to assign varchar value to it.
_____________
Code for TallyGenerator
May 21, 2008 at 7:04 am
Agree with Sergiy. The error tells you the problem.
May 21, 2008 at 8:19 am
May 21, 2008 at 9:13 am
The script is acceptible in SQL 2005, but not in SQL 2000. You need to remove the quotes for default values.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply