Hi
I was using the code mentioned in the below article to upload an ntext column value to a file. The query works fine and gives out no error messages . But, it is not giving any output too.
I mean to say that the file used was storing nothing. Instead it was returning the zero kb file at the end. I.e., no output to a file at the end.
http://www.thescripts. com/forum/thread485349.ht ml
Any...
User Profile
Collapse
-
Ntext column value to a file
-
You can use "updatetext ".. Its syntax and use is as below. With updatetext you can update the ntext column partly unlike the typical "update" where it will update the column content entirely with new content
DECLARE @ptrval binary(16)
SELECT @ptrval = TEXTPTR(pr_info )
FROM pub_info pr, publishers p
WHERE p.pub_id = pr.pub_id
AND p.pub_name = 'New Moon Books'
UPDATETEXT... -
----------------------------------
Declare string_index int
Declare col_length int
select string_index = PATINDEX('%@%', columnname),
col_length = length(columnna me)
FROM tablename
WHERE 'Write your condition here'
Now, you can use the query below to return the
SELECT SUBSTRING(colum nname, string_index, (col_length - string_index))
from tablename WHERE 'Write your condition...Leave a comment:
No activity results to display
Show More
Leave a comment: