Unanswered: READTEXT return value assign to a varchar for ASE 12.5?
I am using a READTEXT statement within a stored procedure to extract a blob of text that has been stored as a binary image. I need to then convert that binary representation back to Ascii. My question is.... is there a way to assign the 'returned' binary from the READTEXT statement to a variable so that I may use the variable in the CONVERT statement? I then need to have the Ascii result of the CONVERT command assigned to a variable for return to the calling routine.
Here is an example of the code I have been trying to create (ASE 12.5).
create table a (aa int, bb text)
insert into a values (1,"1111111111")
select @myPtr=textptr (bb)
exec @a = ("READTEXT a.bb" + @myPtr + "1 20")
/* Give my error - If I want the result set to @a */
/* How do I assign @a to the return values from the READTEXT ? */
I am appreciative of any and all assistance I recieve.