HI,
can anyone help me replicating this into report studio
SELECT CONVERT(VARCHAR(255),CONVERT(VARBINARY(255),fieldname)) FROM Table Name
Thanks in Advance.
Cast:
http://publib.boulder.ibm.com/infocenter/cbi/v10r1m0/index.jsp?topic=%2Fcom.ibm.swg.im.cognos.ug_cr_rptstd.10.1.0.doc%2Fug_cr_rptstd_id52032sql99_cast.html
Grim,
The link you provided is converting a string to varchar......but here I want to convert a field which is varbinary to varchar
Doubt you can convert a binary to char, but the answer still stands.
Syntax
cast ( expression , datatype_specification )
IE. cast ( expression , varchar() )
Grim,
Its not working.
What is the business requirement to convert a Binary to Char?
What DB is the backend?
SQL server 2008
Grim,
cast ( expression , datatype_specification )
this is working. earlier I made a small mistake
Cool.
So just to satisfy my curiosity. Why are you casting a binary to a char?
One of the field has binary values....so to get the values of that field we need to convert it.
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...
::)