Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Read XML Document using TSQL in Query Analyzer

Posted on 2010-11-22
3
Medium Priority
?
773 Views
Last Modified: 2012-05-10
Hi,

I have a table (Logs) with a column called Message of type XML.
Data is getting stored in this table using a web service (.Net) and they said, it is of type XML document (System.Xml.XmlDocument)

Is there any way to read the value (may be as a string)  through Query Analyzer?
0
Comment
Question by:batchakamal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Expert Comment

by:Bardobrave
ID: 34187726
If the xml document is stored as a string you can read it from the table with a simple select. Then you can load it to a xml editor and see it in a normalized way.

If System.Xml.XmlDocument is some type of byte-coded information wich encloses in one of their fields the xml itself, probably you'll only obtain a strange stream of byte data that you won't be able to understand from Query Analyzer.

However you could try to import that data into a project that's able to understood that data type and read it's xml through code.
0
 
LVL 6

Accepted Solution

by:
subhashpunia earned 1500 total points
ID: 34195527
You can see the textual data stored in xml datatype column in query analyzer by quering the table using SELECT statement.
IN SQL Server 2005, if you want to see some specific values from then you can xml methods like query(), value(), exist() and nodes().
0
 
LVL 4

Author Closing Comment

by:batchakamal
ID: 34745087
dfdsfsd
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question