Replace Varbinary Content

Discussion in 'Programming' started by crlfrancis, Jun 21, 2009.

  1. #1
    Hello
    There is this column that is varbinary and i want to replace just one part of its content in mssql, for example:

    this is its content:
    '0x17CB8BC829'

    and i just want to change the C8 for FF

    I tried this:

    DECLARE @value1 VARBINARY;
    DECLARE @value2 VARBINARY;

    SET @value1 = C8
    SET @value2 = FF

    update table
    set column=replace(column,@value1,@value2)

    It says Invalid column name @value1

    Anyone knows a soultion?
     
    crlfrancis, Jun 21, 2009 IP