Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
JeffT
Posting Yak Master
111 Posts |
Posted - 2008-04-01 : 08:09:54
|
Hi,I have received a very large XML file along with the XSD file from another system. I want to process it using SQLXMLBulkLoad (file is too large for OPENXML) and insert the shredded data into a table. One of the examples I found when I googled bulk load had the "sql:relation" annotation in the xsd file, pointing to the table to be inserted into. My XSD file does not have the "sql:relation" annotation and I'm wondering how (where?) I can specify the table I want to update ?We have SQL Server 2000. Thanks,J. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-01 : 08:16:27
|
http://technet.microsoft.com/en-us/library/ms171756.aspxMaybe your XML file only contains one table? E 12°55'05.25"N 56°04'39.16" |
 |
|
JeffT
Posting Yak Master
111 Posts |
Posted - 2008-04-01 : 08:26:06
|
Thanks Peso. I'm a real XML novice so I'm sure I'm not being clear enough here. In the example I saw, SQLXMLbulkload was being run from a ".vbs" script file so I created one similar to it for my purposes (below). The example had the sql:relation in the ".xsd" file but my file below does not. I guess I'm just wondering where I point to the table I want to update since it's not pointed to in the ".xsd" file I received. Thanks... set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.3.0")objBL.ConnectionString = "Provider=SQLOLEDB.1;Data Source=nnn.nn.nnn.nn;Initial Catalog=name;User ID=user;Password=pswd"objBL.ErrorLogFile = "c:\error.log"objBL.Execute "C:\XML_Load\Provider.xsd", "C:\XML_Load\Provider.xml"set objBL=Nothing |
 |
|
|
|
|