SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to display binary text to my string SQL query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jlopez
Starting Member

Saudi Arabia
2 Posts

Posted - 11/23/2012 :  23:42:34  Show Profile  Reply with Quote
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

Malaysia
942 Posts

Posted - 11/24/2012 :  01:36:51  Show Profile  Reply with Quote
doesn't looks like mssql...
Go to Top of Page

jlopez
Starting Member

Saudi Arabia
2 Posts

Posted - 11/24/2012 :  03:11:51  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000