Go Premium for a chance to win a PS4. Enter to Win

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

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?
0
craigdev
Asked:
craigdev
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
Update urTable
SET vabinaryColumn  = cast (vabinaryColumn as Varchar(50) )
0
 
craigdevAuthor Commented:
thanks mate
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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