Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

Cannot input varchar value to changed to varchar column from int (previous)

having a table where has a column previously was assigned as int, after changing to varchar, it has the following error while inputting varchar value (eg. 314414 / 0A24)

error message :

'conversion failed when converting the varchar value to data type int sql server'
0
doramail05
Asked:
doramail05
1 Solution
 
HuaMinChenBusiness AnalystCommented:
This is a data problem. It means you can't convert one varchar into an integer properly.
0
 
doramail05Author Commented:
but (eg. 314414 / 0A24) is a varchar sample data

not sure the reason why it couldnt enter into a changed to varchar column from int
0
 
HuaMinChenBusiness AnalystCommented:
There is cast to do the conversion and please the data type of the column is varchar.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Sreedhar VengalaSr. Consultant - Business IntelligenceCommented:
You should be able to enter the data into Varchar Column which is been changed from Int to Varchar.   Just check again the table design and make sure the column is changed from varchar from int and is been saved properly.
0
 
doramail05Author Commented:
i guess it is,

even if i script it,

it also shows that it is a varchar(50) column
0
 
HuaMinChenBusiness AnalystCommented:
I think there is a cast somewhere, like in the trigger of the table, which is doing the conversion and leads to this problem now.
0
 
Anthony PerkinsCommented:
Unfortunately we are not sitting at your computer so unless you can post your table schema and the SQL query you are executing we can only provide wild guesses.
0
 
ZberteocCommented:
Does the table have a trigger or a computed column?
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now