﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by David Bird / Article Discussions / Article Discussions by Author  / Import *.Dat file in SQL database / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 24 May 2012 12:44:44 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Import *.Dat file in SQL database</title><link>http://www.sqlservercentral.com/Forums/Topic692801-283-1.aspx</link><description>Here is sample for Books online that uses XQuery methods[code]DECLARE @x xml-- Replace "!" with " ", as the code formatting eats up the XML SET @x='!Root&amp;gt;    !row id="1"&amp;gt;!name&amp;gt;Larry!/name&amp;gt;!oflw&amp;gt;some text!/oflw&amp;gt;!/row&amp;gt;    !row id="2"&amp;gt;!name&amp;gt;moe!/name&amp;gt;!/row&amp;gt;    !row id="3" /!!/Root&amp;gt;'SELECT T.c.query('.') AS resultFROM   @x.nodes('/Root/row') T(c)SELECT T.c.value('name[1]', 'VARCHAR(100)' ) AS result,	   T.c.value('oflw[1]', 'VARCHAR(100)' ) AS result	FROM   @x.nodes('/Root/row') T(c)[/code]Edit:Replaced the existing XML to non XML</description><pubDate>Wed, 08 Apr 2009 08:59:32 GMT</pubDate><dc:creator>Ramesh Saive</dc:creator></item><item><title>Import *.Dat file in SQL database</title><link>http://www.sqlservercentral.com/Forums/Topic692801-283-1.aspx</link><description>[color=green]Dear all, Please help me,I have a Log.Dat file which is from ArcView software. Inside the Log.Dat file like XML code:     [/color]How can I import the fields "Time", "type", "code", "target" ... etc in to SQL database?Please help.</description><pubDate>Wed, 08 Apr 2009 01:10:25 GMT</pubDate><dc:creator>yoothasak1</dc:creator></item></channel></rss>
