RE: how to import an xml file to sql
- From: Dee <Dee@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 17 Jan 2008 07:33:00 -0800
By reading in the xml with excel or flat files in pieces here is what I got
in sql scripts:
I could not import the data or not all of it doing it that way ran into
errors. The option field is very large so I made it more then 255. The
exactual xml file is 95,529 kb. Will it all get imported? Do I strill use
the info you sent me?
[Id] [nvarchar](255) NULL,
[Description] [nvarchar](255) NULL,
[Url] [nvarchar](255) NULL,
[Caption] [nvarchar](max) NULL,
[CaptionNoHTML] [nvarchar](max) NULL,
[Code] [nvarchar](255) NULL,
[BasePrice] [float] NULL,
[SalePrice] [float] NULL,
[Categories] [nvarchar](255) NULL,
[Thumb] [nvarchar](255) NULL,
[ThumbHeight] [float] NULL,
[ThumbWidth] [float] NULL,
[Picture] [nvarchar](255) NULL,
[PictureHeight] [float] NULL,
[PictureWidth] [float] NULL,
[Weight] [float] NULL,
[Orderable] [nvarchar](255) NULL,
[Taxable] [nvarchar](255) NULL,
[LocalizedBasePrice] [float] NULL,
[Availability] [nvarchar](255) NULL,
[options] [nvarchar](3000) NULL,
[SKU] [nvarchar](255) NULL,
[OptionID] [nvarchar](255) NULL,
[OptionName] [nvarchar](255) NULL,
[OptionParentID] [nvarchar](255) NULL
[Id] [nvarchar](255) NULL,
[ProductRef_ID] [nvarchar](255) NULL,
[ProductRef_Url] [nvarchar](255) NULL,
[ProductRef_Name] [nvarchar](255) NULL
[Items Sold] [float] NULL,
[Orders] [float] NULL,
[Revenue] [float] NULL,
[Page Views] [float] NULL,
[Item] [nvarchar](255) NULL,
[SKU] [nvarchar](255) NULL
Hope this was the information you wanted.
Thanks Dee
"Dee" wrote:
Thank you so much. I download booksonline and will view it..
For some reason, I could not get my SSIS open in the database, but I see
that the intergration manager is installed and running. Also for some
reason I could not get that create to work as it showed on the web site you
attached.
But I like you feel you have given me enough so I can start and see if it
works.
I will be testing all of this tomorrow. Reading tonight.
Thank you so much for the help and I will get the information needed.
Dee
"ML" wrote:
As you can see in my example, I guessed the data types. I was hoping to see
the table definition (CREATE TABLE statements), but I think you'll manage. :)
Adding columns is the easy part - just follow the example. Also, look up
OPENXML in Books Online - there are some nice examples there as well. In
fact, look up all keywords that are new to you in Books Online.
ML
---
Matija Lah, SQL Server MVP
http://milambda.blogspot.com/
- Follow-Ups:
- RE: how to import an xml file to sql
- From: Dee
- RE: how to import an xml file to sql
- From: Dee
- RE: how to import an xml file to sql
- References:
- RE: how to import an xml file to sql
- From: Dee
- RE: how to import an xml file to sql
- From: ML
- RE: how to import an xml file to sql
- From: Dee
- RE: how to import an xml file to sql
- Prev by Date: Exporting Data from Rich Text Fields?
- Next by Date: RE: how to import an xml file to sql
- Previous by thread: RE: how to import an xml file to sql
- Next by thread: RE: how to import an xml file to sql
- Index(es):
Relevant Pages
|