April 14, 2009 at 8:57 am
Hi I have XML and XSD file. how can i import data into sql Server.When i Use SSIS.Xml FIle and XSD file.I am getting an error.
Error at Data Flow Task [XML Source [2829]]: There was an error setting up the mapping. The MinLength constraining facet is invalid - The string '' is not a valid Integer value.
Is there any way i can use T sql Code to import this into my table
Thanks
April 14, 2009 at 10:59 am
Hi,
By looking at the error, may be this is related to the Length of the field. Please verify the Length of the fields with the XML values/XSD Schema.
Instead of using SSIS you can do it in simple way.
Check out the below link
http://weblogs.sqlteam.com/mladenp/archive/2007/06/18/60235.aspx
April 14, 2009 at 5:24 pm
Hi
As Vijaya Kadiyala already stated your XML is not valid for the specified XSD. This is no error in SSIS. Have a look for XSD attribute nillable="true" and XSI attribute nil="true".
Greets
Flo
April 14, 2009 at 8:39 pm
Hi FLo
In short you can call me "VJ";-)
April 14, 2009 at 9:22 pm
I am not sure about the XSD file as I have never tried. However, for an xml file, I just cheat a little bit.
In BOL, checkout bulk insert using OPENROWSET. This should help you import the XML file.
Once you actually have the data into the server then you can use sp_xml_preparedocument to actually shred the file into specific rows.
Fraggle
April 15, 2009 at 4:02 am
Vijaya Kadiyala (4/14/2009)
Hi FLoIn short you can call me "VJ";-)
Hi VJ
Thanks for that ;-). I try to keep in mind!
Have a nice day
Flo
April 15, 2009 at 8:11 am
Hi raghu,
did you get the answer?
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply