Convert column from Varbinary(50) to Varchar(50)

A database column that I am working with has a field that was mistakenly set to Varbinary(50) instead of Varchar(50). I changed it to Varchar(50) however now all the characters in the column have been padded with extra unknown characters. How do I fix the data in this column to remove the extra characters?
LVL 1
craigdevAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
Update urTable
SET vabinaryColumn  = cast (vabinaryColumn as Varchar(50) )
0
 
craigdevAuthor Commented:
thanks mate
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.