April 8, 2009 at 1:10 am
Dear all,
Please help me,I have a Log.Dat file which is from ArcView software. Inside the Log.Dat file like XML code:
How can I import the fields "Time", "type", "code", "target" ... etc in to SQL database?
Please help.
April 8, 2009 at 8:59 am
Here is sample for Books online that uses XQuery methods
DECLARE @x xml
-- Replace "!" with " ", as the code formatting eats up the XML
SET @x='!Root>
!row id="1">!name>Larry!/name>!oflw>some text!/oflw>!/row>
!row id="2">!name>moe!/name>!/row>
!row id="3" /!
!/Root>'
SELECT T.c.query('.') AS result
FROM @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)
Edit:
Replaced the existing XML to non XML
--Ramesh
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy