-1
こんにちは、子ノードに属性を追加しようとすると文字列リテラルエラーが発生します。属性を正しく追加するためにコードを変更するにはどうすればよいですか。XMLデータ型のメソッド "modify"の引数1は、文字列リテラルでなければなりません
declare @count int=(select mxGraphXML.value('count(/mxGraphModel/root/Cell/@Value)','nvarchar') from TABLE_LIST
where Table_ListID=1234)
declare @index int=1;
while @index<[email protected]
begin
declare @Value varchar(100)= @graphxml.value('(/mxGraphModel/root/Cell/@Value)[1]','nvarchar');
SET @graphxml.modify('insert attribute copyValueID {sql:variable("@Value ")}
as first into (/mxGraphModel/root/Cell)['+convert(varchar,@index)+']');
end
set @[email protected]+1;
end
申し訳ありませんが、ここで私はgraphXMLの子ノードに新しい属性を挿入したいが、CONCATは単独では許可されていないか、graph.modify –