Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to display binary text to my string SQL query

Author  Topic 

jlopez
Starting Member

2 Posts

Posted - 2012-11-23 : 23:42:34
Hi, i need your help how to display the original text in my select statement. when i used select *, it shows binary text not the readable text.

SELECT *
FROM
dbo.ttttxt010400
where t_ctxt between 1 and 2

table : tttxt010400
fields and data type
1. ctxt long 4
2. clan str 1
3. seqe long 4
4. text str 240


result
1 2 1 0x4165726174696F6E2050726F6A6563740A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020 0 0
2 2 1 0x39313020636F6D70616E79206D617070696E6720646F6E6520666F7220666577207472616E73616374696F6E730D0A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020 0 0

desired output
1 2 1 Aeration Project
2 2 1 910 company mapping done for few transactions

waterduck
Aged Yak Warrior

982 Posts

Posted - 2012-11-24 : 01:36:51
doesn't looks like mssql...
Go to Top of Page

jlopez
Starting Member

2 Posts

Posted - 2012-11-24 : 03:11:51
i got the solution now.

SELECT *,convert(VARCHAR(2000),t_text)
FROM
dbo.ttttxt010400
where t_ctxt between 1 and 2

extending the convert to more chars. Thanks.
Go to Top of Page
   

- Advertisement -