We help IT Professionals succeed at work.
Get Started

strange results from openxml sql server 2005

scm0sml
scm0sml asked
on
379 Views
Last Modified: 2012-06-21
Hi,

I have the following sp.

Basically I am trying to pass in some xml and will then extract from this into a temp table but at the moment doing a simple select * from is bringing back results I don't understand, this is the first time I have used openxml so would be good if someone could explain and tell me what I am doing wrong.

The results are in an attached spreadsheet.

Thanks in advance. eg.xls
ALTER PROCEDURE dbo.SP_Get_685_Report
(
	@LINEIDXML TEXT
)

AS

DECLARE @idoc INT

EXEC sp_xml_preparedocument @idoc OUTPUT, @LINEIDXML

SELECT *
FROM OPENXML(@idoc, '/xml',1) 

EXEC sp_xml_removedocument @idoc

Open in new window

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE