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

  • SEARCH
  • Home
  • 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 8588993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:56:14+00:00 2026-06-11T22:56:14+00:00

Okay, I have a table that has a column called bdParameters , datatype is

  • 0

Okay, I have a table that has a column called bdParameters, datatype is text. The data stored in the bdParameters column is XML saved as text.

The data goes like this:

<root>
    <row statusID="ALL" subID="ALL" viewMaskFields="false" masID="219" 
         userID="13" prptyDate="08/19/2011" docID="21b15c9e-76a5-44ed-afbb-96b6df2cf881" 
         resmID="8806" leaID="6345" reshID="3560" doEmail="" emailFrom="" emailTo="" 
         emailMsg="penarands" emailSubject="" fieldList="1" fmtID="2" OptInCES="Yes" 
         SendVaiEmailCES="1" RPIPMCURL="blabla@blabla.com" />
    <Custom>
       <UpdateResidentLetter>
          <Row Status="NOTPRINTED" Notes="Created from bulk lettersinterface" />
       </UpdateResidentLetter>
    </Custom>
</root>

I want to be able to select only the attribute emailMsg from that xml.

Is that possible? If so, how?

  • 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-06-11T22:56:15+00:00Added an answer on June 11, 2026 at 10:56 pm

    Use xml.value with the @ symbol to get the attribute

    declare @t table (col xml);
    insert @t select '
    <root><row statusID="ALL" subID="ALL" viewMaskFields="false" masID="219" 
    userID="13" prptyDate="08/19/2011" docID="21b15c9e-76a5-44ed-afbb-96b6df2cf881" 
    resmID="8806" leaID="6345" reshID="3560" doEmail="" emailFrom="" emailTo="" 
    emailMsg="penarands" emailSubject="" fieldList="1" fmtID="2" OptInCES="Yes" 
    SendVaiEmailCES="1" RPIPMCURL="lm-10-254-9-52.onesitedev.realpage.com" /><Custom>
    <UpdateResidentLetter><Row Status="NOTPRINTED" Notes="Created from bulk letters
     interface" /></UpdateResidentLetter></Custom></root>';
    
    select col.value('(/root/row/@emailMsg)[1]','varchar(max)') emailMsg
    from @t
    
    -- result
    penarands
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay I have a table that looks as following: id | status(bool) | devicename(text)
okay, i'm setting up a multi-user chat system. i have a messages table, that
Okay, I'm stumped here. I have a control that is comprised of a table.
I have a table that displays a column of test names, with several (unlimited
QUESTION: Is it okay to have shortcut identifiers in a table so that I
Okay so I made some changes to a stored procedure that we have, and
I have a winform data entry and retrieval program called CaseNotes. This has a
Okay... So, I came across the following problem: I have one table that works
I am wondering if it is okay to have master and detail table for
Okay, here's the situation: We have a table of about 50 columns (created by

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.