Showing posts with label readable. Show all posts
Showing posts with label readable. Show all posts

Sunday, March 25, 2012

Converting binary to string

is there a way to query a varbinary column and print the readable char in query analyzer?

thanks in advance!

Ryan

No way to do this, because SQL only store the binary data and has no sense for character encoding and structure of the doc.|||

There is a way, here it is...

declare @.pass varchar(30)
declare @.binPass varbinary(8)
set @.binPass = (select password from tblEMP where empid = '123')
set @.pass = (select cast(@.binPass as varchar(20)))
print reverse(@.pass)

I get characters like squares after the text, but I know to disregard them and only look at the text. Anyone know how to get rid of the squares and weird characters? thanks

Ryan

|||

SQL Server will convert varbinary to varchar what it will not convert is varbinary to text. Try the link below for the complete conversion chart and code samples. Hope this helps.

http://msdn2.microsoft.com/en-us/library/ms187928.aspx

sqlsql

Converting Binary Image to Readable Text

I have a table that contains the following two columns:

BITS (image(16))
BIT_LENGTH (int(4))

When I look at the table, I see "OLE Object" in the BITS column. What
syntax should I use in a SELECT statement to convert the binary image
info contained in "BITS" into simple text that I can read? What role
does the BIT_LENGTH field play?An image column can store any binary data, so you need to know what the
data represents before you can display it - it could be a Word
document, a PDF, an MP3 etc. Do you already know exactly what the
column is storing ('text' is the normal data type for large amounts of
text data)? As for BIT_LENGTH, it could mean anything, depending on the
data model - there's no need for an image column to have an associated
length column with it.

It sounds a little like you've just taken over a database from someone
else? If so, you might want to review this chapter from the SQL2000
Resource Kit, which provides more detailed information about storing
and retrieving BLOBs:

http://www.microsoft.com/technet/pr...art3/c1161.mspx

Simon

Thursday, March 22, 2012

converting a databases transaction log into a human readable file

SQL SERVER 2000
Hello All,
Is there a method for converting a databases transaction log into a human
readable file (SQL) for the purposes of conducting an audit or debugging a
particular set of circumstances?
Thanks in advance
Russell J Morgan
Hi
You need to buy 3rd party tools to do this
www.logpi.com and http://www.lumigent.com
Regards
Mike
"Russell J Morgan" wrote:

> SQL SERVER 2000
> Hello All,
> Is there a method for converting a databases transaction log into a human
> readable file (SQL) for the purposes of conducting an audit or debugging a
> particular set of circumstances?
> Thanks in advance
> Russell J Morgan
>
>

converting a databases transaction log into a human readable file

SQL SERVER 2000
Hello All,
Is there a method for converting a databases transaction log into a human
readable file (SQL) for the purposes of conducting an audit or debugging a
particular set of circumstances?
Thanks in advance
Russell J MorganHi
You need to buy 3rd party tools to do this
www.logpi.com and http://www.lumigent.com
Regards
Mike
"Russell J Morgan" wrote:

> SQL SERVER 2000
> Hello All,
> Is there a method for converting a databases transaction log into a human
> readable file (SQL) for the purposes of conducting an audit or debugging a
> particular set of circumstances?
> Thanks in advance
> Russell J Morgan
>
>

converting a databases transaction log into a human readable file

SQL SERVER 2000
Hello All,
Is there a method for converting a databases transaction log into a human
readable file (SQL) for the purposes of conducting an audit or debugging a
particular set of circumstances?
Thanks in advance
Russell J MorganHi
You need to buy 3rd party tools to do this
www.logpi.com and http://www.lumigent.com
Regards
Mike
"Russell J Morgan" wrote:
> SQL SERVER 2000
> Hello All,
> Is there a method for converting a databases transaction log into a human
> readable file (SQL) for the purposes of conducting an audit or debugging a
> particular set of circumstances?
> Thanks in advance
> Russell J Morgan
>
>sqlsql