How can I import XML from a file into SQL-server using transact SQL
(preferably without installing extra add-ons). We are using SQLServer 2000.
Because there is already XML support via the function OPENXML,
the steps I already took are the following:
- import the XML-file via package into a temp table where each line is a record.
- then I inserted all these records into another table in one field of type TEXT so this field contains my complete XML document.
And that is where I'm stuck. There exists the function sp_xml_preparedocument which takes a parm of type TEXT but how can I supply this from being the output of that table field in transact-SQL since local variables cannot have type TEXT...