Solved

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

Posted on 2014-04-03
8
333 Views
Last Modified: 2014-04-08
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
Comment
Question by:doramail05
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 11

Expert Comment

by:HuaMinChen
ID: 39977143
This is a data problem. It means you can't convert one varchar into an integer properly.
0
 
LVL 1

Author Comment

by:doramail05
ID: 39977150
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
 
LVL 11

Expert Comment

by:HuaMinChen
ID: 39977159
There is cast to do the conversion and please the data type of the column is varchar.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 9

Expert Comment

by:Sreedhar Vengala
ID: 39977170
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
 
LVL 1

Author Comment

by:doramail05
ID: 39977194
i guess it is,

even if i script it,

it also shows that it is a varchar(50) column
0
 
LVL 11

Expert Comment

by:HuaMinChen
ID: 39977300
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
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39978026
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
 
LVL 27

Accepted Solution

by:
Zberteoc earned 500 total points
ID: 39978125
Does the table have a trigger or a computed column?
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question