October 25, 2005 at 2:28 am
Please would somebody suggest how one might pass the value returned by READTEXT to a variable (eg SET @MyVar = READTEXT ...)
October 25, 2005 at 4:21 am
Hi!!!!
Pls check it more on BOL..
USE pubs
GO
DECLARE @ptrval varbinary(16)
SELECT @ptrval = TEXTPTR(pr_info)
FROM pub_info pr INNER JOIN publishers p
ON pr.pub_id = p.pub_id
AND p.pub_name = 'New Moon Books'
READTEXT pub_info.pr_info @ptrval 1 25
GO
Regards,
Papillon
October 25, 2005 at 4:24 am
Thanks, but I want to put the result in a variable within the stored procedure; not just display it. BOL doesn't say anything about that.
October 25, 2005 at 6:20 am
DECLARE @var varchar(8000)
SELECT @var = [textcol] FROM
will retrieve the first 8000 chars
SELECT @var = SUBSTRING([textcol],10,10) FROM
will retrieve 10 chars starting at char 10
Far away is close at hand in the images of elsewhere.
Anon.
October 25, 2005 at 6:22 am
David, yes!
I had been thinking that SUBSTRING was restricted to the first 8k but have just realised that it isn't. Thanks to you and everyone who has given time to this.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply