Extract and Insert Xml nodes
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 64 articles for 0.013 sec
Re: Extract and Insert Xml nodes     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: Mike C#
Date: Feb 29, 2008 10:16

... A("@member_id") order by "@member_id" for xml path('member'), type) from T2gid ... update with the XML DML statement only inserts a single node from table1 ...Thanks, Mike. This works for 1 node: DECLARE @insertStmt nvarchar(MAX) DECLARE @... 'UPDATE table2 SET sync_data.modify(''insert ' + @insertXML + ' before (/group/member[1])[1...
Show full article (4.96Kb) · Show article thread
Re: Extract and Insert Xml nodes     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: Michael Rys [MSFT]
Date: Feb 28, 2008 11:19

...FROM tab1 cross apply x.nodes('/group/member') as N(m...member_id") order by "@member_id" for xml path('member'), type) from T2gid...with the XML DML statement only inserts a single node from...Mike. This works for 1 node: DECLARE @insertStmt nvarchar(MAX) DECLARE...UPDATE table2 SET sync_data.modify(''insert ' + @insertXML + ' before (/group/member[1...
Show full article (4.52Kb) · Show article thread
Re: Extract and Insert Xml nodes     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: Michael Rys [MSFT]
Date: Feb 28, 2008 10:52

...member_id") order by "@member_id" for xml path('member'), type) from T2gid ...with the XML DML statement only inserts a single node from...table2, when it should be inserting them all. I'm probably...Mike. This works for 1 node: DECLARE @insertStmt nvarchar(MAX) DECLARE...UPDATE table2 SET sync_data.modify(''insert ' + @insertXML + ' before (/group/member[1...
Show full article (3.25Kb) · Show article thread
Re: Extract and Insert Xml nodes     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: Mike C#
Date: Feb 22, 2008 08:08

... some reason SET Member.modify('insert <member member_id="{sql:column(''member_id... with the XML DML statement only inserts a single node from ... Mike. This works for 1 node: DECLARE @insertStmt nvarchar(MAX) DECLARE ...FROM table1 CROSS APPLY xml_data.nodes('/group/member') AS NewTable(Member...UPDATE table2 SET sync_data.modify(''insert ' + @insertXML + ' before (/group/member[1...
Show full article (1.85Kb) · Show article thread
Re: Extract and Insert Xml nodes     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: ndillon45
Date: Feb 22, 2008 07:15

Thanks, Mike. This works for 1 node: DECLARE @insertStmt nvarchar(MAX) DECLARE @insertXML ...('.')) FROM table1 CROSS APPLY xml_data.nodes('/group/member') AS NewTable(Member) ... = 'UPDATE table2 SET sync_data.modify(''insert ' + @insertXML + ' before (/group/member[1])[1... @insertStmt ...but not for multiple nodes. I guess I'll have to use a cursor and insert one node at a time...
Show full article (0.78Kb) · Show article thread
Re: Extract and Insert Xml nodes     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: Mike C#
Date: Feb 21, 2008 21:59

... that to insert new nodes in table2 with XML DML if you decide to go the XML DML route. <ndillon45@gmail.com>... figured out how to extract the nodes: SELECT NewTable.Member.query('.')... FROM table1 CROSS APPLY xml_data.nodes('/group/member') AS NewTable(Member...member_id', 'int') FROM table2 CROSS APPLY sync_data.nodes('/group/member') AS...
Show full article (0.85Kb) · Show article thread
Re: Extract and Insert Xml nodes     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: ndillon45
Date: Feb 21, 2008 13:26

I figured out how to extract the nodes: SELECT NewTable.Member.query('.') FROM table1 CROSS APPLY xml_data.nodes('/group/member') AS NewTable(Member) WHERE pk_column_id... ref.value('@member_id', 'int') FROM table2 CROSS APPLY sync_data.nodes('/group/member') AS node(ref) WHERE pk_column_id = 1) Now I just need to know how to...
Show full article (0.46Kb) · Show article thread
Extract and Insert Xml nodes     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: ndillon45
Date: Feb 21, 2008 11:48

In SQL Server, how would you extract: <member member_id="3" /> <member member_id="4" /> from a sql column of type xml with value: <group group_id="1"> <member member_id="2" />... member_id="4" /> <member member_id="5" /> </group> and insert (the above extraction) into another sql column of type xml with current value: <group group_id="2"> <member member_id="2...
Show full article (0.63Kb)
Re: xml packet -> xml data type -> relational tables (performance)     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: Eugene Kogan [MSFT]
Date: Jul 20, 2007 15:12

... parent axis navigation, possibly with stacked nodes() methods through CROSS APPLY. Also, ...h.data.value (@a , 'int' ) from @xml.nodes(/parent/child) as h(data...as attributes of this element. I extract it current by loading the data...) as h(data) then I insert the .value into an int table... the schema functionality with the xml data type. Expert help would ...
Show full article (2.91Kb)
Re: annotation issue with SQLXML - BulkLoad     

Group: microsoft.public.sqlserver.xml · Group Profile · Search for Extract and Insert Xml nodes in microsoft.public.sqlserver.xml
Author: Bob
Date: Aug 28, 2008 03:41

... @debug_yn = 1 SELECT @sql -- Extract loaded XML EXEC sp_executesql @sql, N'@xml...x.y.value( '@type', 'SYSNAME' ) FROM @xml.nodes( '//xs:element' ) x(y) ...Add sql:is-constant attribute SET @xml.modify( 'declare namespace sql="urn:schemas-microsoft-com:mapping-schema"; insert attribute sql:is-constant{1} ... IF @debug_yn = 1 -- Inspect the XML afterwards SELECT 'After' AS source,...
Show full article (3.92Kb) · Show article thread
1 · 2 · 3 · 4 · 5 · 6 · 7 · next