vb.net - Fetching XML Data into SQL Server Select Statement -


I have a dataset and dataable in Vb.net, I have converted that datatale value into XML so that I It is possible to write in rows that is not included in the SQL server, but it is calling repeatedly stored procedures for hundreds of thousands of rows.

Here I have sample XML and SQL scripts

  DECLARE @MyXML XML SET @MyXML = '& lt; NewDataSet & gt; & Lt; Table & gt; & Lt; ColVal & gt; 507.6100 & lt; / ColVal & gt; & Lt; / Table & gt; & Lt; Table & gt; & Lt; ColVal & gt; 750.5800 & lt; / ColVal & gt; & Lt; / Table & gt; & Lt; Table & gt; & Lt; ColVal & gt; 328.3600 & lt; / ColVal & gt; & Lt; / Table & gt; & Lt; Table & gt; & Lt; ColVal & gt; 194.7700 & lt; / ColVal & gt; & Lt; / Table & gt; & Lt; / NewDataSet & gt; False 4 @ Mike ML.nodes ('NewDataSet') A (B)   as' SELECT abvalue ('Table [1] / ColVal [1]', 'varchar (10)') Ol> 
  • Results: 507.6100

    This only returns the first line data, I want to get all the rows.

    move your query so that the child's level is on the table (otherwise tab [1] will be restricted as a result):

      SELECT abvalue ('ColVal [1]', 'varchar (10)') AS Fruits4 FROM @ MyXML.nodes ('NewDataSet / Table') A (B)   



  • Comments

    Popular posts from this blog

    Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

    multithreading - PhantomJS-Node in a for Loop -

    c++ - MATLAB .m file to .mex file using Matlab Compiler -