Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Is there a typo in the openxml part? Expand / Collapse
Author
Message
Posted Monday, December 31, 2012 5:58 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, December 31, 2012 7:13 PM
Points: 6, Visits: 6
Did you make a mistake in the openxml example?
I ask this because you have the following:

EXEC sp_xml_prepareDocument @hdoc OUTPUT, @Doc

So now I have to access the xml data using @hdoc right?
But you do it through @idoc in the following statement.

FROM Openxml (@iDoc,'//StockMarketData/StockData ')

You refer the reader to a Microsoft example which is:

EXEC sp_xml_preparedocument @idoc OUTPUT, @doc

OPENXML (@idoc, '/ROOT/Customer',1)

So it would seem that your openxml statement should be:

FROM Openxml (@hdoc,'//StockMarketData/StockData'@iDoc)

Am I correct or am I missing something because I do not understand how you can access the xml data using
@idoc which you initialize to a value of 1? Struggling a little with this.
Post #1401533
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse