Re: annotation issue with SQLXML - BulkLoad
  Home FAQ Contact Sign in
microsoft.public.sqlserver.xml only
 
Advanced search
POPULAR GROUPS

more...

microsoft.public.sqlserver.xml Profile…
 Up
Re: annotation issue with SQLXML - BulkLoad         


Author: Travis McGee
Date: Aug 27, 2008 16:39

To Mr. Lifesaver Bob,

Yes, I made it work with your xsd schema. But you successfully ignored my
questions, so that I can understand why there are such problems.
You underestimate the number of changes, but there are at least...
Show full article (5.09Kb)
2 Comments
Re: annotation issue with SQLXML - BulkLoad         


Author: Bob
Date: Aug 28, 2008 03:41

As far as I can tell, the only differences required to make this work are:
1) add sql:is-constant with namespace
2) convert xs:integers to xs:decimals or even xs:string
3) convert xs:date to xs:string

I haven't been ignoring your questions, I'm afraid I can't answer questions
as to why xsds won't work with SQL Server. Maybe they are meant to be
compatible with .net. Have you tried any .net methods of reading XML files
with schemas? Maybe there are compatibility problems with XML data-types and
SQL Server data-types. It's not unusual in ETL to have to load to a staging
table (eg where all columns are VARCHAR) and then clean the data.

All I know is, these xsd are not quite suitable for SQL Server straightaway,
but need a few minor modifications.

I have been working on way to make this easy, so it can be used against
multiple xsds. Try this:

IF OBJECT_ID( 'dbo.usp_fix_xsd' ) IS NOT NULL
DROP PROC dbo.usp_fix_xsd
GO
Show full article (3.92Kb)
no comments
Re: annotation issue with SQLXML - BulkLoad         


Author: Bob
Date: Sep 5, 2008 05:21

How did you get on with this stored procedure? Did it work?

I noticed it wasn't quite doing the namespace correctly but don't know if
that caused a problem for you.

"Travis McGee" wrote:
> To Mr. Lifesaver Bob,
>
> Yes, I made it work with your xsd schema. But you successfully ignored my
> questions, so that I can understand why there are such problems.
> You underestimate the number...
Show full article (5.56Kb)
no comments