Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Read XML Document using TSQL in Query Analyzer

Posted on 2010-11-22
3
Medium Priority
?
774 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
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.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

824 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