Solved

Read XML Document using TSQL in Query Analyzer

Posted on 2010-11-22
3
764 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
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 500 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to setup several different housekeeping processes for a 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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now