If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to convert varbinary into varchar in report studio????

Started by rr.bi1212, 24 Feb 2012 09:05:56 AM

Previous topic - Next topic

rr.bi1212

HI,
can anyone help me replicating this into report studio

SELECT CONVERT(VARCHAR(255),CONVERT(VARBINARY(255),fieldname)) FROM Table Name

Thanks in Advance.

Grim

"Honorary Master of IBM Links"- MFGF
Certified IBM C8 & C10 Admin, Gamer, Geek and all around nice guy.
<-Applaud if my rant helped! 8)

rr.bi1212

Grim,

The link you provided is converting a string to varchar......but here I want to convert a field which is varbinary to varchar

Grim

Doubt you can convert a binary to char, but the answer still stands.

Syntax
cast ( expression , datatype_specification )

IE. cast ( expression , varchar() )
"Honorary Master of IBM Links"- MFGF
Certified IBM C8 & C10 Admin, Gamer, Geek and all around nice guy.
<-Applaud if my rant helped! 8)

rr.bi1212


Grim

What is the business requirement to convert a Binary to Char?

What DB is the backend?
"Honorary Master of IBM Links"- MFGF
Certified IBM C8 & C10 Admin, Gamer, Geek and all around nice guy.
<-Applaud if my rant helped! 8)

rr.bi1212


rr.bi1212

Grim,

cast ( expression , datatype_specification )

this is working. earlier I made a small mistake

Grim

Cool.

So just to satisfy my curiosity. Why are you casting a binary to a char?
"Honorary Master of IBM Links"- MFGF
Certified IBM C8 & C10 Admin, Gamer, Geek and all around nice guy.
<-Applaud if my rant helped! 8)

rr.bi1212

One of the field has binary values....so to get the values of that field we need  to convert it.

Grim

Quote from: rr.bi1212 on 24 Feb 2012 03:34:31 PM
One of the field has binary values....so to get the values of that field we need  to convert it.

Yeah...I got that part already...
::)
"Honorary Master of IBM Links"- MFGF
Certified IBM C8 & C10 Admin, Gamer, Geek and all around nice guy.
<-Applaud if my rant helped! 8)