Waldemar,
The answer you got suggested UPDATETEXT, but that is only
for types text, ntext, and image. For varbinary/binary, use assignment:
@v = substring(@v,1,@position-1) + @newbyte + substring(@v,@position+1,8000)
The STUFF function may also work, but it is documented as a
string function, not a binary/varbinary function, and may convert
parameters to string and back.
Steve Kass
Drew University
[quoted text, click to view] Waldemar Grzywiñski wrote:
>Ok ... but 'UPDATETEXT' concern table column, not variable. So should I
>create temporaty table, insert variable and update table column by 'TEXTPTR'
>pointer?
>Doesn't easy way? Substring function give me easy 'GET' statement: 'set
>@a=substring(@b,10,1)'. Doesn't exist symmetrical 'PUT'?
>
>
>U¿ytkownik "Waldemar Grzywiñski" <waldemarg@autograf.pl> napisa³ w
>wiadomo¶ci news:e565tiU7FHA.2012@TK2MSFTNGP14.phx.gbl...
>
>
>>When I want to get paticular byte from binary/varbinary variable I use
>>'substring' function, but how to stuff byte on pointed position?
>>
>>
>>
>
>
>
Oh, OK. I thought it was a table column for some reason.
--
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com [quoted text, click to view] "Waldemar Grzywiñski" <waldemarg@autograf.pl> wrote in message
news:%239JTqtW7FHA.3684@TK2MSFTNGP12.phx.gbl...
> Ok ... but 'UPDATETEXT' concern table column, not variable. So should I
> create temporaty table, insert variable and update table column by
> 'TEXTPTR' pointer?
> Doesn't easy way? Substring function give me easy 'GET' statement: 'set
> @a=substring(@b,10,1)'. Doesn't exist symmetrical 'PUT'?
>
>
> U¿ytkownik "Waldemar Grzywiñski" <waldemarg@autograf.pl> napisa³ w
> wiadomo¶ci news:e565tiU7FHA.2012@TK2MSFTNGP14.phx.gbl...
>> When I want to get paticular byte from binary/varbinary variable I use
>> 'substring' function, but how to stuff byte on pointed position?
>>
>
>
Ok ... but 'UPDATETEXT' concern table column, not variable. So should I
create temporaty table, insert variable and update table column by 'TEXTPTR'
pointer?
Doesn't easy way? Substring function give me easy 'GET' statement: 'set
@a=substring(@b,10,1)'. Doesn't exist symmetrical 'PUT'?
U¿ytkownik "Waldemar Grzywiñski" <waldemarg@autograf.pl> napisa³ w
wiadomo¶ci news:e565tiU7FHA.2012@TK2MSFTNGP14.phx.gbl...
[quoted text, click to view] > When I want to get paticular byte from binary/varbinary variable I use
> 'substring' function, but how to stuff byte on pointed position?
>