...
Code Block | ||
---|---|---|
| ||
declare @temp table ( sKey varchar(100) not null , sData varbinary(50) not null ); -- pick one or the other --insert into @temp(sKey,sData) select 'APAndJE_IsUseFlockCode', convert(varbinary(50), 0x01); -- treat as flock code insert into @temp(sKey,sData) select 'APAndJE_IsUseFlockCode', convert(varbinary(50), 0x010x00); -- treat as flock Id merge dbo.ConfigSystem t using @temp s on t.ConfigKey = s.sKey when not matched by target then insert (ConfigKey,[Value]) values (sKey,sData) when matched then update set [Value] = sdata; select *, cast([value] as varchar(max)) from dbo.ConfigSystem; |
...