Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Other Forums
 SQL Server 6.5 \ SQL Server 7.0
 Updating int type in sql 6.5
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 10/15/2009 :  06:15:19  Show Profile  Reply with Quote
Need some advice,

i need to update this particular column,CIT_CTRY_CD which is in smallint type.i need to convert it into varchar type so that i can execute the update statement in my application.

tried this:

update parent set CIT_CTRY_CD=convert(varchar,'2000') where APL_NO='010210111999022711171126'

but got this error msg when executed in SQL SVR 6.5:

Disallowed implicit conversion from datatype 'varchar' to datatype 'smallint' Table: 'PARENT', Column: 'CIT_CTRY_CD'
Use the CONVERT function to run this query.

It works fine if tested in SQL SVR 2000


Flowing Fount of Yak Knowledge

8781 Posts

Posted - 10/15/2009 :  06:27:00  Show Profile  Visit webfred's Homepage  Reply with Quote
Sorry but I cannot see why 2000 should be converted to varchar when storing in a smallint column.
That is senseless.

No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000