Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Convert the Binary data type to string data type Expand / Collapse
Author
Message
Posted Wednesday, July 23, 2008 5:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 17, 2010 9:57 AM
Points: 2, Visits: 7
i need to convert the Binary data type to text datatype how it is possible... if any one tryed on this let me know..
Post #539119
Posted Wednesday, July 23, 2008 5:23 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, May 9, 2013 8:07 AM
Points: 1,221, Visits: 2,614
You should be able to cast it.

declare @tst varbinary(20)
Set @tst = 0x74657374

Select cast(@tst as varchar(20))


Ken Simmons
http://twitter.com/KenSimmons
Post #539126
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse