Push XML data directly to SQL Server -


elements` return sql data directly xml , there proper way of pushing xml file directly sql server ?

if need import xml files database use bulk insert or openrowset(bulk 'filename', single_blob) (ref:bol):

declare @bulkimport table (     id int identity,     x xml );  insert  @bulkimport (x) select  a.b    openrowset(bulk n'd:\src.xml', single_blob) a(b);  select  *    @bulkimport; 

results:

id          x ----------- ----------------------------- 1           <row purchaseorderid="10" ... 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -