This works in 2005.  Not sure about 2000.

PROCEDURE [dbo].[MySproc]

@doc text

AS
BEGIN

DECLARE @idoc int

--Create an internal representation of the XML document.
EXEC sp_xml_preparedocument @idoc OUTPUT, @doc

INSERT INTO MyTable (column1, column2...)
SELECT      column1, column2...
FROM        OPENXML(@idoc, '/xml/path/to/nodes', 0)
               WITH (column1 datatype, column2 datatype...)

EXEC sp_xml_removedocument @idoc

END

On Sat, Dec 20, 2008 at 4:27 PM, Dave Watts <[email protected]> wrote:

> > When executed via QueryAnalyzer I get the following error:
> >
> > Server: Msg 4820, Level 16, State 1, Line 1
> > Could not bulk insert. Unknown version of format file
> 'D:\Websites\globalFunctions
> > \getEventPerformersMapping.xml'.
>
> Actually, rereading your original question, I don't think you can use
> XML format files with SQL Server 2000. I thought that feature was
> introduced with SQL Server 2005.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
>
> Fig Leaf Software provides the highest caliber vendor-authorized
> instruction at our training centers in Washington DC, Atlanta,
> Chicago, Baltimore, Northern Virginia, or on-site at your location.
> Visit http://training.figleaf.com/ for more information!
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317035
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to