February 23, 2010 at 4:49 pm
Hello everyone!
I need some assistance and guidance. I have an XML file that I need to bring it into a SQL 2005 table. The problem is that it is so darn huge that VS2008 cannot open it, nor any other XML viewers/editors out that I have found on the internet; and therefore I do not know the structure. Is there something within SQL 2005 that can help me get all this data into a table?
Once its there, I can do what I need to do in order to properly organize it into our DB.
As usual, any help is extremely highly appreciated.
Regards,
February 23, 2010 at 5:13 pm
johnnycash (2/23/2010)
Hello everyone!I need some assistance and guidance. I have an XML file that I need to bring it into a SQL 2005 table. The problem is that it is so darn huge that VS2008 cannot open it, nor any other XML viewers/editors out that I have found on the internet; and therefore I do not know the structure. Is there something within SQL 2005 that can help me get all this data into a table?
Once its there, I can do what I need to do in order to properly organize it into our DB.
As usual, any help is extremely highly appreciated.
Regards,
Have you tried using OPENROWSET(BULK N'YourFileName', SINGLE_BLOB) to load the file into a temp table?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
February 23, 2010 at 5:18 pm
Hi Wayne!
I was reading about it in BOL but I got confused cause it says that one needs to create the receiving table with the corresponding structure. I do not know the structure of the XML file.
Will your code work?
February 23, 2010 at 5:28 pm
The max size is for data stored with xml data type is 2GB. I don't know if your file would exceed those limit...
Regarding extracting node names and values I would recommend to have a look at the following link:
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply