ncgjiju
17th May 2005, 01:12
Hi

I am trying to read the table tttxt010 for text file . The text is in binary format instead in baan IV it is text format. I am using vbscript to read the table and print out the text part. The sql is "select ttttxt010300.t_text from ttttxt010300 where ttttxt010300.ctxt = 11185" It works but the text file in database is binary. Can anyone help?.


regards,

George

RobertB
17th May 2005, 14:21
Youre almost there - you need simply to do a CONVERT (or CAST) on the binary field; so you'd have something like:select convert(varchar(240), tx.t_text) as text_field
from ttttxt010300 as tx
where tx.t_ctxt = 11185Baan stores texts as 240-character chunks (in binary) under successive sequence numbers. Line-breaks are chr(10)'s.

HTH

Robert

ncgjiju
18th May 2005, 08:06
Thanks for your help, it worked :)