Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2014-01-17 : 16:55:05
|
I have a table the column is TEXTThe myparameter has<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <myrecord1>true</myrecord1><myrecord2>test</myrecord2><myrecord5>false</myrecord5>and I need to update myrecord1 and myrecord5I am stuck on the casting to make it work...any ideas--errors Incorrect syntax near the keyword 'where'.update Test_TableSet myparameter = Cast(Replace (cast(myparameter as nvarchar(max)), '<MYRECORD1>true</MYRECORD1>' , cast('<MYRECORD5>true</MYRECORD5>' as Text) FROM Test_Tablewhere MYVALUE = 'TEST' |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-01-17 : 18:15:04
|
[code]Set myparameter = Cast ( Replace ( cast(myparameter as nvarchar(max)), '<MYRECORD1>true</MYRECORD1>' , '<MYRECORD5>true</MYRECORD5>' ) ) [/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2014-01-18 : 00:05:38
|
Thank you so much |
|
|
|
|
|