About 237,000 results
Open links in new tab
  1. Extracting data from XML using OpenXML in SQL Server

    I have a xml which I want it to be extracted using OpenXML within SQL Server. Here is the sample XML <row> <student_token>7</student_token> <student_ssn>552</student ...

  2. Read xml file in SQL Server - Stack Overflow

    Dec 20, 2020 · SQL-- directly from the XML file as a virtual DB table on the file system ;WITH rs (xmldata) AS ( SELECT ...

  3. SQL Server: OPENXML vs SELECT..FROM when dealing with XML?

    create procedure TestXML @X xml as set nocount on select X.N.value('.', 'varchar(8000)') from @X.nodes('/root/item') as X(N) go create procedure TestOpenXML @X xml as set nocount on declare @idoc int exec sp_xml_preparedocument @idoc out, @X select value from openxml(@idoc, '/root/item',1) with (value varchar(8000) '.') exec sp_xml ...

  4. Import 'xml' into Sql Server - Stack Overflow

    May 30, 2013 · Update: assuming you have your XML in files - you can use this code to load the XML file into an XML variable in SQL Server: DECLARE @XmlFile XML SELECT @XmlFile = BulkColumn FROM OPENROWSET(BULK 'path-to-your-XML-file', SINGLE_BLOB) x; and then use the above code snippet to parse the XML.

  5. How can I query a value in SQL Server XML column

    Apr 27, 2012 · Useful tip. Query a value in SQL Server XML column (XML with namespace) e.g. Table [dbo].[Log_XML ...

  6. XML import into SQL Server using OPENROWSET and OPENXML

    If for some reason you have to use openxml then you need to add namespace declaration to sp_xml_preparedocument call.

  7. OpenXML Import XML file to SQL server table - Stack Overflow

    Oct 31, 2014 · I am trying to set up an SQL job to import an XML file into an SQL Server table. Using OPENXML, I can't seem to select the specific data I need from the file. Here's my code and XML data. I am trying to select Facility and Entity_Code but when I run the code, these fields appear as blank. I would like to transfer these fields into their own table.

  8. sql - How to "Open" XML data in Oracle - Stack Overflow

    Oct 21, 2009 · In my code, I declare @xml as the XML data type and then I set the value and then I use the value in my select. Your code creates the XMLTYPE explicitly in the body of the select. The Oracle solution is probably more efficient but I think the TSQL is …

  9. Convert Xml to Table SQL Server - Stack Overflow

    The sp_xml_preparedocument stored procedure will parse the XML and the OPENXML rowset provider will show you a relational view of the XML data. For details and more examples check the OPENXML documentation. As for your question,

  10. How to use OPENXML to load XML data into existing SQL Table?

    Aug 6, 2010 · But I am trying to load a .XML file into a SQL table that I created for this. I do not receive any errors with this code, but it doesn't insert any records either. This is the table I created in 2008 SQL Server: CREATE TABLE HOMEROOM( HOMEROOM_TEACHER INT, HOMEROOM_NUMBER INT, ENTITY_ID INT) And this is the T-SQL code I am trying to execute:

Refresh