Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6639065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:30:38+00:00 2026-05-25T23:30:38+00:00

I have 280,000 rows that contain a column called body . This column has

  • 0

I have 280,000 rows that contain a column called body. This column has xml data.

A copy of one column value is shown below. I need to extract into new columns the data contained in the elements of the XML field esn, timestamp_utc, Latitude, Longitude, and triggers, with the column names being the same as the element names.

I have worked on this in the past, but gave up on it. I am not at a point I need to figure out how to do it. Please give me any suggestions you may have.

Thank you!!!

<?xml version="1.0" encoding="UTF-8"?>
<telemetry>
   <esn>1127877</esn>
   <timestamp_utc>5/28/2011 9:18:30 PM</timestamp_utc>
   <latitude>59.023672</latitude>
   <longitude>-118.836408</longitude>
   <ignition>N</ignition>
   <geofence>0</geofence>
   <speed>0</speed>
   <heading>0</heading>
   <milestraveled>0.00</milestraveled>
   <triggers>Contact_State_Change, IO_1_Closed, No_Vibration_Detected, </triggers>
   <miscellaneous>Standard3</miscellaneous>
   <contact1counts>0</contact1counts>
   <contact2counts>0</contact2counts>
   <io1state>0</io1state>
   <io2state>0</io2state>
</telemetry>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:30:39+00:00Added an answer on May 25, 2026 at 11:30 pm

    You can use something like this:

    SELECT  
       ID,
       body.value('(telemetry/esn)[1]', 'bigint') AS 'esn',
       body.value('(telemetry/timestamp_utc)[1]', 'varchar(50)') AS 'esn',
       body.value('(telemetry/longitude)[1]', 'float') AS 'longitude',
       body.value('(telemetry/latitude)[1]', 'float') AS 'latitude',             
       body.value('(telemetry/timestamp_utc)[1]', 'varchar(50)') AS 'triggers'
    FROM
       dbo.YourTableNameHere
    

    Does that work, and give you the right data??

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of data that has two points; watts and a time
I have a column filled with data in those rows and i would like
I have a UITableView that loads content into a UIWebView like this: //MainViewController.m -
I have 16,000 jpg's from a webcan screeb grabber that I let run for
I have json file that I have exported using TexturePacker, and it produces this
I have a site that displays data on travel products from a MySQL database.
Have you managed to get Aptana Studio debugging to work? I tried following this,
I just finished a script to import data from an XML file to MySQL,
if we have a javascript object var calories = { apple:200, pear:280, banana:300, peach:325
I have some java classes that work fine until I put them in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.