Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Friday, March 30, 2012

Import question with imbedded tags

Hello,
I'm having a heck of a time trying to make this work, and not being an
expert on XML I'm not even sure what to look for. Can someone point me
in the right direction to import an XML file that contains this:
--snip--
<client>
<Updated>7/1/2006</updated>
<Business Number="11223">
<Name>Smith Glass</name>
<Added>4/2/2005</Added>
<PrimaryContact>
<Name>John Smith</name>
<Phone>301-222-4433</phone>
</PrimaryContact>
<SecondaryContact>
<Name>Jack Jones</name>
<Phone>301-222-4322</phone>
</SecondaryContact>
</Business>
<Business Number="44332">
<Name>Anderson Drywall</name>
<Added>5/1/2005</Added>
<PrimaryContact>
<Name>Mike Anderson</name>
<Phone>301-223-6689</phone>
</PrimaryContact>
<SecondaryContact>
<Name>Nancy Taylor</name>
<Phone>301-542-6643</phone>
</SecondaryContact>
</Business>
</client>
--snip--
Into a SQL table like this:
ID Name Added Person1 Person2
11223 Smith Glass 4/2/2005 John Smith Jack Jones
44332 Anderson Drywall 5/1/2005 Mike Anderson Nancy Taylor
The spaces probably skewed alittle, but hopefully it comes over okay.
Thanks :)
AlexYou can use the nodes() function with CROSS APPLY to shred your xml. Here
is a example cut down from your example:
shred the input file into this table
CREATE TABLE ClientExm
(
ID INT,
Name NVARCHAR(100),
Added DateTime,
Person1 NVARCHAR(100),
Person2 NVARCHAR(100),
)
INSERT INTO ClientExm
SELECT
X.C.value('@.Number', 'INT'),
X.C.value('name[1]', 'NVARCHAR(100)'),
X.C.value('added[1]', 'DATETIME'),
X.C.value('primaryContact[1]/name[1]', 'NVARCHAR(100)'),
X.C.value('secondaryContact[1]/name[1]', 'NVARCHAR(100)')
FROM (SELECT CAST(BulkColumn AS XML) AS B FROM OPENROWSET(
BULK 'C:\Clientexm.xml', SINGLE_BLOB) AS X) AS S
CROSS APPLY
S.B.nodes('/client/business') AS X(C)
SELECT * from ClientExm
ID Name
Added Person1
Person2
-- ---
--
-- ----
---
----
--
11223 Smith Glass
2005-04-02 00:00:00.000 John Smith
Jack Jones
44332 Anderson Drywall
2005-05-01 00:00:00.000 Mike Anderson
Nancy Taylor
11223 Smith Glass
2005-04-02 00:00:00.000 John Smith
Jack Jones
44332 Anderson Drywall
2005-05-01 00:00:00.000 Mike Anderson
Nancy Taylor
the file c:\clientexm.xml contains
<client>
<updated>7/1/2006</updated>
<business Number="11223">
<name>Smith Glass</name>
<added>4/2/2005</added>
<primaryContact>
<name>John Smith</name>
<phone>301-222-4433</phone>
</primaryContact>
<secondaryContact>
<name>Jack Jones</name>
<phone>301-222-4322</phone>
</secondaryContact>
</business>
<business Number="44332">
<name>Anderson Drywall</name>
<added>5/1/2005</added>
<primaryContact>
<name>Mike Anderson</name>
<phone>301-223-6689</phone>
</primaryContact>
<secondaryContact>
<name>Nancy Taylor</name>
<phone>301-542-6643</phone>
</secondaryContact>
</business>
<business Number="11223">
<name>Smith Glass</name>
<added>4/2/2005</added>
<primaryContact>
<name>John Smith</name>
<phone>301-222-4433</phone>
</primaryContact>
<secondaryContact>
<name>Jack Jones</name>
<phone>301-222-4322</phone>
</secondaryContact>
</business>
<business Number="44332">
<name>Anderson Drywall</name>
<added>5/1/2005</added>
<primaryContact>
<name>Mike Anderson</name>
<phone>301-223-6689</phone>
</primaryContact>
<secondaryContact>
<name>Nancy Taylor</name>
<phone>301-542-6643</phone>
</secondaryContact>
</business>
</client>
Dan

> Hello,
> I'm having a heck of a time trying to make this work, and not being an
> expert on XML I'm not even sure what to look for. Can someone point
> me in the right direction to import an XML file that contains this:
> --snip--
> <client>
> <Updated>7/1/2006</updated>
> <Business Number="11223">
> <Name>Smith Glass</name>
> <Added>4/2/2005</Added>
> <PrimaryContact>
> <Name>John Smith</name>
> <Phone>301-222-4433</phone>
> </PrimaryContact>
> <SecondaryContact>
> <Name>Jack Jones</name>
> <Phone>301-222-4322</phone>
> </SecondaryContact>
> </Business>
> <Business Number="44332">
> <Name>Anderson Drywall</name>
> <Added>5/1/2005</Added>
> <PrimaryContact>
> <Name>Mike Anderson</name>
> <Phone>301-223-6689</phone>
> </PrimaryContact>
> <SecondaryContact>
> <Name>Nancy Taylor</name>
> <Phone>301-542-6643</phone>
> </SecondaryContact>
> </Business>
> </client>
> --snip--
> Into a SQL table like this:
> ID Name Added Person1 Person2 11223 Smith
> Glass 4/2/2005 John Smith Jack Jones 44332 Anderson Drywall
> 5/1/2005 Mike Anderson Nancy Taylor
> The spaces probably skewed alittle, but hopefully it comes over okay.
> Thanks :)
> Alex
>|||Dan wrote:
> You can use the nodes() function with CROSS APPLY to shred your xml. Here
> is a example cut down from your example:
> shred the input file into this table
> CREATE TABLE ClientExm
> (
> ID INT,
> Name NVARCHAR(100),
> Added DateTime,
> Person1 NVARCHAR(100),
> Person2 NVARCHAR(100),
> )
>
> INSERT INTO ClientExm
> SELECT
> X.C.value('@.Number', 'INT'),
> X.C.value('name[1]', 'NVARCHAR(100)'),
> X.C.value('added[1]', 'DATETIME'),
> X.C.value('primaryContact[1]/name[1]', 'NVARCHAR(100)'),
> X.C.value('secondaryContact[1]/name[1]', 'NVARCHAR(100)')
> FROM (SELECT CAST(BulkColumn AS XML) AS B FROM OPENROWSET(
> BULK 'C:\Clientexm.xml', SINGLE_BLOB) AS X) AS S
> CROSS APPLY
> S.B.nodes('/client/business') AS X(C)
>
> SELECT * from ClientExm
> ID Name
> Added Person1
> Person2
> -- ---
---
> -- ----
----
> ----
--
> 11223 Smith Glass
> 2005-04-02 00:00:00.000 John Smith
> Jack Jones
> 44332 Anderson Drywall
> 2005-05-01 00:00:00.000 Mike Ander
son
> Nancy Taylor
> 11223 Smith Glass
> 2005-04-02 00:00:00.000 John Smith
> Jack Jones
> 44332 Anderson Drywall
> 2005-05-01 00:00:00.000 Mike Ander
son
> Nancy Taylor
>
Hi Dan,
Too awesome! Thanks for putting this together for me, but I guess I
should've told you I'm using MS SQL 2000... when I try to run this in
query analyzer it gives a syntax error with the BULK command. Hmmm...
if this only works on SQL2000 then I'll hold onto the snippet for when
we upgrade, which no telling when that'll be.
Any suggestions for running this on SQL 2000? If not, i'm back to my
digging :) Thanks,
Alex|||You may be able to do what you need with OPENXML. Below is an example but
look up OPENXML and sp_xml_preparedocument in the BOL for more details.
Also lookup SQLXML and annotated schema for another way to accomlish this.
DECLARE @.hdoc INT
EXEC sp_xml_preparedocument @.hdoc OUTPUT,
'<client>
<updated>7/1/2006</updated>
<business Number="11223">
<name>Smith Glass</name>
<added>4/2/2005</added>
<primaryContact>
<name>John Smith</name>
<phone>301-222-4433</phone>
</primaryContact>
<secondaryContact>
<name>Jack Jones</name>
<phone>301-222-4322</phone>
</secondaryContact>
</business>
<business Number="44332">
<name>Anderson Drywall</name>
<added>5/1/2005</added>
<primaryContact>
<name>Mike Anderson</name>
<phone>301-223-6689</phone>
</primaryContact>
<secondaryContact>
<name>Nancy Taylor</name>
<phone>301-542-6643</phone>
</secondaryContact>
</business>
<business Number="11223">
<name>Smith Glass</name>
<added>4/2/2005</added>
<primaryContact>
<name>John Smith</name>
<phone>301-222-4433</phone>
</primaryContact>
<secondaryContact>
<name>Jack Jones</name>
<phone>301-222-4322</phone>
</secondaryContact>
</business>
<business Number="44332">
<name>Anderson Drywall</name>
<added>5/1/2005</added>
<primaryContact>
<name>Mike Anderson</name>
<phone>301-223-6689</phone>
</primaryContact>
<secondaryContact>
<name>Nancy Taylor</name>
<phone>301-542-6643</phone>
</secondaryContact>
</business>
</client>'
INSERT INTO ClientExm
SELECT *
FROM OPENXML(@.hdoc, '/client/business', 2)
WITH
([Number] INT '@.Number',
[name] NVARCHAR(100) 'name',
[added] DATETIME 'added',
[primaryContact] NVARCHAR(100) 'primaryContact/name',
[secondaryContact] NVARCHAR(100)'secondaryContact/name'
)
Dan
EXEC sp_xml_removedocument @.hdoc

> Dan wrote:
>
> Hi Dan,
> Too awesome! Thanks for putting this together for me, but I guess I
> should've told you I'm using MS SQL 2000... when I try to run this in
> query analyzer it gives a syntax error with the BULK command. Hmmm...
> if this only works on SQL2000 then I'll hold onto the snippet for when
> we upgrade, which no telling when that'll be.
> Any suggestions for running this on SQL 2000? If not, i'm back to my
> digging :) Thanks,
> Alex
>sql

Import of XML data.

Dear all,
I have been asked to look into the following.
Data is delivered in XML format.
(Assume wel formed XML and the stylesheet is present).
This data has to be imported in the database.
What are the possibilities in 2005?
What are the possibilities in 2000?
Especially are there enough possibilities to import the XML data 2000. Or do
we need a special workaround voor 2000 ?
My experience with XML is very limited. Once the data is present in the
database I'll will be able to transform the data in such a way that it fits
in the target tables.
Thanks for your time and attention,
Ben Brugman"ben brugman" <ben@.niethier.nl> wrote in message
news:u00%23337oIHA.1952@.TK2MSFTNGP05.phx.gbl...
> Dear all,
> I have been asked to look into the following.
> Data is delivered in XML format.
> (Assume wel formed XML and the stylesheet is present).
> This data has to be imported in the database.
> What are the possibilities in 2005?
> What are the possibilities in 2000?
> Especially are there enough possibilities to import the XML data 2000. Or
> do we need a special workaround voor 2000 ?
> My experience with XML is very limited. Once the data is present in the
> database I'll will be able to transform the data in such a way that it
> fits in the target tables.
> Thanks for your time and attention,
> Ben Brugman
>
2005 has more XML related features, but you can import the data into 2000 as
well.
Take a look at the OPENXML command in the Books Online. You can use those
queries to pull the data from the XML document into whatever format you
wish.
Rick Sawtell|||Thank you, I hadn't thought about this possibility.
Does this say that I can not import directly from XML into 2000?
Because then I do not have to look further into that ally.
Thanks for your time and suggestion,
Ben Brugman
"Rick Sawtell" <r_sawtell@.nospam.hotmail.com> schreef in bericht
news:Op%232VF9oIHA.4912@.TK2MSFTNGP03.phx.gbl...
> "ben brugman" <ben@.niethier.nl> wrote in message
> news:u00%23337oIHA.1952@.TK2MSFTNGP05.phx.gbl...
>> Dear all,
>> I have been asked to look into the following.
>> Data is delivered in XML format.
>> (Assume wel formed XML and the stylesheet is present).
>> This data has to be imported in the database.
>> What are the possibilities in 2005?
>> What are the possibilities in 2000?
>> Especially are there enough possibilities to import the XML data 2000. Or
>> do we need a special workaround voor 2000 ?
>> My experience with XML is very limited. Once the data is present in the
>> database I'll will be able to transform the data in such a way that it
>> fits in the target tables.
>> Thanks for your time and attention,
>> Ben Brugman
> 2005 has more XML related features, but you can import the data into 2000
> as well.
> Take a look at the OPENXML command in the Books Online. You can use those
> queries to pull the data from the XML document into whatever format you
> wish.
>
> Rick Sawtell
>|||"ben brugman" <ben@.niethier.nl> wrote in message
news:7c959$480ce938$53557893$11072@.cache90.multikabel.net...
> Thank you, I hadn't thought about this possibility.
> Does this say that I can not import directly from XML into 2000?
> Because then I do not have to look further into that ally.
> Thanks for your time and suggestion,
> Ben Brugman
>
That depends on your needs. You could put an XML column into a text/ntext
or sufficiently large varchar/nvarchar field in SQL Server 2000. But then
you would be treating the XML as a single column in a table. This can also
be done in 2005, but as an XML data type rather than string datatypes listed
above. 2005 also has other advantages like binding an XSD to the XML data
type.
In order to map the columns in a database table(s) to specific nodes in the
xml object, you would need to use the OPENXML with some XPATH queries.
It is relatively straightforward.
As far as outputting XML, there are several avenues for you to pursue. This
includes the SELECT ... FOR XML scenario as well as some others.
HTH
Rick Sawtell

Wednesday, March 28, 2012

import multiple XML files at once

Hi,

I have about 300-400 XML files I want to load in my SQL database (2005). The following code will load one (1) file. How do i do a mulitple collections?

INSERT INTO MEL (DATA)SELECT *FROM OPENROWSET (BULK
'C:\Temp\CHAPTER1.xml', SINGLE_BLOB)AS TEMP

Thanks,

http://www.sqlservercentral.com/columnists/smoore/importingxmlfilesintosqlserver.asp

See this article.. i think ur schema should be same for each file...

|||

Thank you for the help. This script runs in VBS, how do I do this in VB.NET or from with SQL (stored procedure)? Also I am looking to import the XML as RAW XML. My XML files are large and complex and I want to store them in a table with TYPE of the field "XML".

Thanks Again,

Bones

|||

Example to use the below stored proc

-- Listing 2

CREATE TABLE #Files (MyFile varchar(200))

CREATE TABLE #Lines (MyLine varchar(8000))

DECLARE @.MyFile varchar(200), @.SQL varchar(2000), @.Path varchar(400)

SET @.Path = 'C:\Program Files\Microsoft SQL Server\MSSQL\'

EXECUTE sp_ListFiles @.Path,'#Files','%.txt',NULL,0

SELECT @.MyFile = MyFile FROM #Files WHERE MyFile LIKE 'README%'

SET @.SQL = 'BULK INSERT #Lines FROM ' + CHAR(39) + @.Path + @.MyFile + CHAR(39)

EXECUTE (@.SQL)

SELECT * FROM #Lines

DROP TABLE #Files

DROP TABLE #Lines

1---------------------23StoredProcedure:sp_ListFiles45---------------------6789USE master10GO11CREATE PROCEDURE dbo.sp_ListFiles12 @.PCWritevarchar(2000),13 @.DBTablevarchar(100)=NULL,14 @.PCIntravarchar(100)=NULL,15 @.PCExtravarchar(100)=NULL,16 @.DBUltrabit = 017AS1819SET NOCOUNT ON2021DECLARE @.Return int22DECLARE @.Retainint23DECLARE @.Statusint2425SET @.Status = 02627DECLARE @.Taskvarchar(2000)2829DECLARE @.Work varchar(2000)3031DECLARE @.Wishvarchar(2000)3233SET @.Work ='DIR ' +'"' + @.PCWrite +'"'3435CREATE TABLE #DBAZ (Name varchar(400),Work int IDENTITY(1,1))3637INSERT #DBAZEXECUTE @.Return = master.dbo.xp_cmdshell @.Work3839SET @.Retain =@.@.ERROR4041IF @.Status = 0SET @.Status = @.Retain42IF @.Status = 0SET @.Status = @.Return4344IF (SELECTCOUNT(*)FROM #DBAZ) < 44546BEGIN4748 SELECT @.Wish =Name FROM #DBAZWHERE Work = 14950IF @.WishISNULL5152BEGIN5354 RAISERROR ('General error [%d]',16,1,@.Status)5556END5758 ELSE5960 BEGIN6162 RAISERROR (@.Wish,16,1)6364END6566 END6768ELSE6970 BEGIN7172 DELETE #DBAZWHEREISDATE(SUBSTRING(Name,1,10)) = 0ORSUBSTRING(Name,40,1) ='.'ORNameLIKE'%.lnk'7374IF @.DBTableISNULL7576BEGIN7778 SELECTSUBSTRING(Name,40,100)AS Files79FROM #DBAZ80WHERE 0 = 081AND (@.DBUltra = 0ORNameLIKE'%<DIR>%')82AND (@.DBUltra != 0ORNameNOT LIKE'%<DIR>%')83AND (@.PCIntraISNULL ORSUBSTRING(Name,40,100)LIKE @.PCIntra)84AND (@.PCExtraISNULL ORSUBSTRING(Name,40,100)NOT LIKE @.PCExtra)85ORDER BY 18687END8889 ELSE9091 BEGIN9293 SET @.Task =' INSERT ' +REPLACE(@.DBTable,CHAR(32),CHAR(95))94 +' SELECT SUBSTRING(Name,40,100) AS Files'95 +' FROM #DBAZ'96 +' WHERE 0 = 0'97 +CASEWHEN @.DBUltra = 0THEN''ELSE' AND Name LIKE ' +CHAR(39) +'%<DIR>%' +CHAR(39)END98 +CASEWHEN @.DBUltra != 0THEN''ELSE' AND Name NOT LIKE ' +CHAR(39) +'%<DIR>%' +CHAR(39)END99 +CASEWHEN @.PCIntraISNULLTHEN''ELSE' AND SUBSTRING(Name,40,100) LIKE ' +CHAR(39) + @.PCIntra +CHAR(39)END100 +CASEWHEN @.PCExtraISNULLTHEN''ELSE' AND SUBSTRING(Name,40,100) NOT LIKE ' +CHAR(39) + @.PCExtra +CHAR(39)END101 +' ORDER BY 1'102103IF @.Status = 0EXECUTE (@.Task)SET @.Return =@.@.ERROR104105IF @.Status = 0SET @.Status = @.Return106107 END108109 END110111DROP TABLE #DBAZ112113SET NOCOUNT OFF114115RETURN (@.Status)116117GO118119-- Listing 2120

The above proc will return the list of files in a folder. Use the resulSet of this proc and then run a a cursor or loop to execute your procedure

|||

Thanks Satya

You've been very helpful.

Bones

Import large xml document into sql server 2005

Hi,
I am trying to import a large xml document into sql server 2005 from a c#
client.
On the server side, the database has the following structure:
urn varchar[80] : some identifier
xmlCol xml : the xml data
The following code works well for small xml documents, but I get an
OutOfMemoryException with large ones
FileStream sr = new FileStream(@."doc.xml", FileMode.Open);
string urn = @."urn:x-test:111";
SqlCommand cmd = wDbConn.CreateCommand();
cmd.CommandText = "Insert tabletest(urn, xmlCol) Values(@.urn, @.xmlCol)";
SqlParameter firstColParameter =
cmd.Parameters.Add("@.urn",SqlDbType.VarChar);
firstColParameter.Value = urn;
SqlParameter secondColParameter = cmd.Parameters.Add("@.xmlCol",
SqlDbType.Variant);
secondColParameter.Value = new SqlXml(sr); ;
cmd.ExecuteNonQuery();
Is there a way to solve this problem ?
Best regards,
Vincent Brunie"Vincent Brunie" <VincentBrunie@.discussions.microsoft.com> wrote in message
news:87DBBD77-9C01-4BCC-BD0C-577576D161C1@.microsoft.com...
> Hi,
> I am trying to import a large xml document into sql server 2005 from a c#
> client.
> On the server side, the database has the following structure:
> urn varchar[80] : some identifier
> xmlCol xml : the xml data
> The following code works well for small xml documents, but I get an
> OutOfMemoryException with large ones
> FileStream sr = new FileStream(@."doc.xml", FileMode.Open);
> string urn = @."urn:x-test:111";
>
> SqlCommand cmd = wDbConn.CreateCommand();
> cmd.CommandText = "Insert tabletest(urn, xmlCol) Values(@.urn,
> @.xmlCol)";
>
>
> SqlParameter firstColParameter =
> cmd.Parameters.Add("@.urn",SqlDbType.VarChar);
>
Why are you using VarChar instead of XML for the parameter type?
David|||Use Ntext for the XML parameter if your .Net version is earlier than 2.0.
Pohwan Han. Seoul. Have a nice day.
"Vincent Brunie" <VincentBrunie@.discussions.microsoft.com> wrote in message
news:87DBBD77-9C01-4BCC-BD0C-577576D161C1@.microsoft.com...
> Hi,
> I am trying to import a large xml document into sql server 2005 from a c#
> client.
> On the server side, the database has the following structure:
> urn varchar[80] : some identifier
> xmlCol xml : the xml data
> The following code works well for small xml documents, but I get an
> OutOfMemoryException with large ones
> FileStream sr = new FileStream(@."doc.xml", FileMode.Open);
> string urn = @."urn:x-test:111";
>
> SqlCommand cmd = wDbConn.CreateCommand();
> cmd.CommandText = "Insert tabletest(urn, xmlCol) Values(@.urn,
> @.xmlCol)";
>
>
> SqlParameter firstColParameter =
> cmd.Parameters.Add("@.urn",SqlDbType.VarChar);
> firstColParameter.Value = urn;
>
> SqlParameter secondColParameter = cmd.Parameters.Add("@.xmlCol",
> SqlDbType.Variant);
> secondColParameter.Value = new SqlXml(sr); ;
>
> cmd.ExecuteNonQuery();
>
> Is there a way to solve this problem ?
>
> Best regards,
> Vincent Brunie
>|||Hi all,
Hi,
I tried with SqlDbType.xml, SqlDbType.Varchar and SqlDbType.Text and I have
the same problem.
I work with .NET Framework 2.0.
I have the feeling that the whole xml document is loaded into memory before
being sent to the server. Is there a way to avoid this ?
Regards,
Vincent
"Vincent Brunie" wrote:

> Hi,
> I am trying to import a large xml document into sql server 2005 from a c#
> client.
> On the server side, the database has the following structure:
> urn varchar[80] : some identifier
> xmlCol xml : the xml data
> The following code works well for small xml documents, but I get an
> OutOfMemoryException with large ones
> FileStream sr = new FileStream(@."doc.xml", FileMode.Open);
> string urn = @."urn:x-test:111";
>
> SqlCommand cmd = wDbConn.CreateCommand();
> cmd.CommandText = "Insert tabletest(urn, xmlCol) Values(@.urn, @.xmlCol)
";
>
>
> SqlParameter firstColParameter =
> cmd.Parameters.Add("@.urn",SqlDbType.VarChar);
> firstColParameter.Value = urn;
>
> SqlParameter secondColParameter = cmd.Parameters.Add("@.xmlCol",
> SqlDbType.Variant);
> secondColParameter.Value = new SqlXml(sr); ;
>
> cmd.ExecuteNonQuery();
>
> Is there a way to solve this problem ?
>
> Best regards,
> Vincent Brunie
>|||Hello Vincent,

> I tried with SqlDbType.xml, SqlDbType.Varchar and SqlDbType.Text and I
> have the same problem.
> I work with .NET Framework 2.0.
> I have the feeling that the whole xml document is loaded into memory
> before being sent to the server. Is there a way to avoid this ?
No, not really, because the instance of XML has to be both valid and complet
e
at the end of the transaction.
However, if you're working with SQL Server 2005 and you can get the file
on to that server, you might try a SQL Query like this:
use scratch
go
create table dbo.xmlLoadExample
(
pkid tinyint identity(1,1) primary key
, doc xml
)
go
insert into dbo.xmlLoadExample(doc)
select * from OpenRowset(bulk N'c:\some.xml',SINGLE_BLOB) as useless
go
select doc from dbo.XmlLoadExample
go
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||Hello Kent,
Thank you for your answer. Do you if there could be a way to put this query
into a stored procedure and to have the procedure read the data from a strea
m
coming from the client instead of a local file ?
Regards,
Vincent
"Kent Tegels" wrote:

> Hello Vincent,
>
> No, not really, because the instance of XML has to be both valid and compl
ete
> at the end of the transaction.
> However, if you're working with SQL Server 2005 and you can get the file
> on to that server, you might try a SQL Query like this:
> use scratch
> go
> create table dbo.xmlLoadExample
> (
> pkid tinyint identity(1,1) primary key
> , doc xml
> )
> go
> insert into dbo.xmlLoadExample(doc)
> select * from OpenRowset(bulk N'c:\some.xml',SINGLE_BLOB) as useless
> go
> select doc from dbo.XmlLoadExample
> go
>
> Thank you,
> Kent Tegels
> DevelopMentor
> http://staff.develop.com/ktegels/
>
>|||Hello Vincent,

> Thank you for your answer. Do you if there could be a way to put this
> query into a stored procedure and to have the procedure read the data
> from a stream coming from the client instead of a local file ?
Putting the code into a stored procedure is easy. Having the procedure read
from a stream isn't. You can't really pass a stream to SQL Server as there's
no streaming data type.
I'll keep pondering on this though.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/

Monday, March 26, 2012

Import from XML File to SQL Table

Hi ,

I am importing data from an xml file that validates itself against a schema. I need to import some of the values to the corresponding columns in the table. Other elements will be inserted to the a column of type XML.

The size of the file is about 500+MB. I have already tried SSIS. It does not validate my schema, in spite of the fact that the schema is valid. I tried to copy using SQLXML Bulk Insert, but this does not suit to my particular situation.

I am using SQL Server 2005.

What are my options? Any examples / code samples will do.

Thank you,

Zaboo

What is it about SQLXML that doesn't suit your needs?

How about some sample data, ddl, etc.?

Friday, March 23, 2012

Import folder of XML

I'm Sql7 and have a folder full of XML"S I would like to import into a
table.
any examples how I could do this ...
Thanks.
You best upgrade to SQL Server 2005... You can use NTEXT or TEXT
columns...
Best regards
Michael
"Hoosbruin" <Hoosbruin@.Kconline.com> wrote in message
news:NOGdnZNdXLxiwkveRVn-iQ@.kconline.com...
> I'm Sql7 and have a folder full of XML"S I would like to import into a
> table.
> any examples how I could do this ...
>
> Thanks.
>

Import folder of XML

I'm Sql7 and have a folder full of XML"S I would like to import into a
table.
any examples how I could do this ...
Thanks.You best upgrade to SQL Server 2005... You can use NTEXT or TEXT
columns...
Best regards
Michael
"Hoosbruin" <Hoosbruin@.Kconline.com> wrote in message
news:NOGdnZNdXLxiwkveRVn-iQ@.kconline.com...
> I'm Sql7 and have a folder full of XML"S I would like to import into a
> table.
> any examples how I could do this ...
>
> Thanks.
>

Monday, March 12, 2012

Import Data into XML

I have an XML File created to my specs. How do I import data into XML?
I have a PRN file, tab delimited, that I want to import, or convert
his PRN to Excel, which I can do and then import the Excel data into
XML? I created an XML file based off a DTD template. Now I need to
import data into this XML file.
Please help
Thanks,
Brian
You mean you want to "convert" your data into XML? Well, Office 2003 can do
it for you (using Word or XL). You could also have your own application read
through the file and general XML, or use XSL for generating the XML. Here is
one sample: http://www.devx.com/getHelpOn/10MinuteSolution/20356
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
"Brian Jorgenson" <bjorgenson@.charter.net> wrote in message
news:34ec3ea7.0407200738.3d09f58c@.posting.google.c om...
> I have an XML File created to my specs. How do I import data into XML?
> I have a PRN file, tab delimited, that I want to import, or convert
> his PRN to Excel, which I can do and then import the Excel data into
> XML? I created an XML file based off a DTD template. Now I need to
> import data into this XML file.
> Please help
>
> Thanks,
> Brian
|||Not convert, but import data into an existing XML file. Is there a way
to join the tags in XML to the field's in an Excel file so the right
data gets imported into the correct XML tag's.
"SriSamp" <ssampath@.sct.co.in> wrote in message news:<#UNqO6obEHA.1656@.TK2MSFTNGP09.phx.gbl>...[vbcol=seagreen]
> You mean you want to "convert" your data into XML? Well, Office 2003 can do
> it for you (using Word or XL). You could also have your own application read
> through the file and general XML, or use XSL for generating the XML. Here is
> one sample: http://www.devx.com/getHelpOn/10MinuteSolution/20356
> --
> HTH,
> SriSamp
> Please reply to the whole group only!
> http://www32.brinkster.com/srisamp
> "Brian Jorgenson" <bjorgenson@.charter.net> wrote in message
> news:34ec3ea7.0407200738.3d09f58c@.posting.google.c om...
|||XL 2003 allows you to map data in the sheet to specific tags in an XML.
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
"Brian Jorgenson" <bjorgenson@.charter.net> wrote in message
news:34ec3ea7.0407241902.6ab0c13a@.posting.google.c om...
> Not convert, but import data into an existing XML file. Is there a way
> to join the tags in XML to the field's in an Excel file so the right
> data gets imported into the correct XML tag's.
> "SriSamp" <ssampath@.sct.co.in> wrote in message
news:<#UNqO6obEHA.1656@.TK2MSFTNGP09.phx.gbl>...[vbcol=seagreen]
can do[vbcol=seagreen]
read[vbcol=seagreen]
Here is[vbcol=seagreen]
|||Very cool... i forgot that Office System is more XML based. I will
give this a try and kudos to you.
"SriSamp" <ssampath@.sct.co.in> wrote in message news:<eX#iICxcEHA.3728@.TK2MSFTNGP09.phx.gbl>...[vbcol=seagreen]
> XL 2003 allows you to map data in the sheet to specific tags in an XML.
> --
> HTH,
> SriSamp
> Please reply to the whole group only!
> http://www32.brinkster.com/srisamp
> "Brian Jorgenson" <bjorgenson@.charter.net> wrote in message
> news:34ec3ea7.0407241902.6ab0c13a@.posting.google.c om...
> news:<#UNqO6obEHA.1656@.TK2MSFTNGP09.phx.gbl>...
> can do
> read
> Here is

IMPORT DATA FROM XML SOURCE TO SQL

Hello,

I'm trying to import data from a xml file (several tables inside) into sql tables.

- In the xml source, I choose the xml and xsd files and I see all tables perfectly.

- Drag the xml source output to Sql Destination input, choose one table to import and create the sql table

- I execute the task and it concludes ok

- In Execution Results window appears as warnings as fields of each one other tables (giving information about this fields are not used at the process and it'll be better removed it in order to increase performance), no errors and success task. The problem is that no one data is imported into sql destination (wrote 0 rows).

Process window:

Information: 0x4004300A at OPP, DTS.Pipeline: Validation phase is beginning.

Warning: 0x80047076 at OPP, DTS.Pipeline: The output column "field_1" (66374) on output "TABLA1" (50424) and component "XML Source" (27281) is not subsequently used in the Data Flow task. Removing this unused output column can increase Data Flow task performance.

Information: 0x40043006 at OPP, DTS.Pipeline: Prepare for Execute phase is beginning.

Information: 0x40043007 at OPP, DTS.Pipeline: Pre-Execute phase is beginning.

Information: 0x4004300C at OPP, DTS.Pipeline: Execute phase is beginning.

Information: 0x40043008 at OPP, DTS.Pipeline: Post Execute phase is beginning.

Information: 0x40043009 at OPP, DTS.Pipeline: Cleanup phase is beginning.

Information: 0x4004300B at OPP, DTS.Pipeline: "component "SQL Server Destination" (20427)" wrote 0 rows.

SSIS package "package.dtsx" finished: Success.

The program '[408] package.dtsx: DTS' has exited with code 0 (0x0).

If I import data of xml file from access, I haven't any problem. All tables are imported

I don't know what can be. Thanks a lot.

Gema

Use a data viewer to see if there's any data in the pipeline.

-Jamie

|||

there's no data into data viewer... What I do?

Gema

|||

It sounds as though its more likely that there is no data coming out of your source file rather than them failing to get inserted into SQL.

I have no idea as to why that may be though. For starters, work on the assumption that there is a fault in the way you have configured it.

-Jamie

|||

I think too that's a problem of xml source configuration (not about sql destination) but I don't know if can be a problem with xml-xsd files (is doesn't at my hand) or because some property of data flow task and/or its elements must be changed...

Thanks a lot, Jamie

Gema

import data from excel to sql

hi there

can I get help about import data from excel sheet to sql server by C#?

from excel to xml and from xml to sql server? or excel to sql directry?

thanks for your fast response.

waeldief@.msn.com

Are you looking to create a generic class to import various xls spreadsheets or the same spreadsheet/format each time? If you are creating a specific file import, the process should be pretty straightforward.|||

Hi CodeInfinite,

I'm looking for away to import the data from excel sheet to my project to deal with it and save it in the database.

Thank you for fast response.

waeldief@.msn.com

Wednesday, March 7, 2012

Import Complex XML file into Sql Server 2000

I need help importing a complex xml file using the XML Bulk Load component. I need there to be 2 tables as shown below. I just

cannot seem to figure out how to get this to work with such a complex XML structure. I have shown below my table structure, a

sample of one of the entries of the XML files and what I have so far for my XSD schema. Any help would be great!!!

My Tables:
CREATE TABLE [dbo].[WPXML] (
[Part] [varchar] (100) PRIMARY KEY,
[BaseVehicle] [int] NULL ,
[Qty] [int] NULL ,
[PartType] [int] NULL ,
[EngineBase] [int] NULL ,
[EngineDesignation] [int] NULL ,
[ImageURL] [varchar] (100) NULL ,
[ThumbURL] [varchar] (100) NULL
)
GO
CREATE TABLE [dbo].[WPPRODUCT] (
[Part] [varchar] (100) PRIMARY KEY ,
[PartNumber] [varchar] (100) NULL ,
[BrandID] [varchar] (4) NULL ,
[BrandDescription] [varchar] (100) NULL ,
[Price] [varchar] (10) COLLATE NULL ,
[ListPrice] [varchar] (10) COLLATE NULL,
[Weight] [varchar] (10) COLLATE NULL,
[Popularity] [varchar] (10) NULL,
[OEFlag] [varchar] (10) NULL,
[ProductRemark] [varchar] (1000) NULL,
[Note] [varchar] (5000) NULL
)
GO

Sample of XML:
<App action="A" id="1484266">
<BaseVehicle id= "5899"/>
<EngineBase id= "555"/>
<EngineDesignation id= "138"/>
<Qty>0</Qty>
<PartType id= "6192"/>
<Part>W0133-1621038</Part>
<Product>
<PartNumber>W0133-1621038</PartNumber>
<BrandID>FUL</BrandID>
<BrandDescription><![CDATA[Full]]></BrandDescription>
<Price>17.38</Price>
<ListPrice>36.60</ListPrice>
<Available>Y</Available>
<Weight>1.05</Weight>
<Popularity>B</Popularity>
</Product>
<Product>
<PartNumber>W0133-1611982</PartNumber>
<BrandID>KN</BrandID>
<BrandDescription><![CDATA[K&N Filters]]></BrandDescription>
<Price>68.78</Price>
<ListPrice>105.81</ListPrice>
<Available>Y</Available>
<Weight>1.80</Weight>
<Popularity>E</Popularity>
</Product>
<Product>
<PartNumber>W0133-1626304</PartNumber>
<BrandID>ND</BrandID>
<BrandDescription><![CDATA[Denso]]></BrandDescription>
<Price>22.34</Price>
<ListPrice>36.60</ListPrice>
<Available>Y</Available>
<OEFlag>OEM</OEFlag>
<Weight>1.05</Weight>
<notes>Notes For This Part</notes>
<Popularity>D</Popularity>
</Product>
<ImageURL><![CDATA[http://img.eautopartscatalog.com/live/W01331621038OES.JPG]]></ImageURL>
<ThumbURL><![CDATA[http://img.eautopartscatalog.com/live/thumb/W01331621038OES.JPG]]></ThumbURL>
</App>

My XSD Schema Thus Far:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:annotation>
<xsd:appinfo>
<sql:relationship name="test"
parent="WPXML"
parent-key="Part"
child="WPPRODUCT"
child-key="Part" />
</xsd:appinfo>
</xsd:annotation>
<xsd:element name="App" sql:relation="WPXML" sql:relationship="test">
<xsd:complexType>
<xsd:sequence>

<xsd:element name="Qty" type="xsd:integer" />
<xsd:element name="Part" type="xsd:string" />
<xsd:element name="BaseVehicle">
<xsd:complexType>
<xsd:attribute name="BaseVehicle" type="xsd:integer" sql:field="BaseVehicle" />
</xsd:complexType>
</xsd:element>
<xsd:element name="PartType">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:integer" sql:field="PartType" />
</xsd:complexType>
</xsd:element>
<xsd:element name="EngineBase">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:integer" sql:field="EngineBase" />
</xsd:complexType>
</xsd:element>
<xsd:element name="EngineDesignation">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:integer" sql:field="EngineDesignation" />
</xsd:complexType>
</xsd:element>
<xsd:element name="ImageURL" type="xsd:string" />
<xsd:element name="ThumbURL" type="xsd:string" />
<xsd:element name="Product" sql:relation="WPPRODUCT" sql:key-fields="Part" sql:relationship="test">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Part" type="xsd:string" />
<xsd:element name="PartNumber" type="xsd:string" >
</xsd:element>
<xsd:element name="BrandID" type="xsd:string" >
</xsd:element>
<xsd:element name="BrandDescription" type="xsd:string" >
</xsd:element>
<xsd:element name="Price" type="xsd:string" >
</xsd:element>
<xsd:element name="ListPrice" type="xsd:string" >
</xsd:element>
<xsd:element name="Weight" type="xsd:string" >
</xsd:element>
<xsd:element name="Popularity" type="xsd:string" >
</xsd:element>
<xsd:element name="OEFlag" type="xsd:string" >
</xsd:element>
<xsd:element name="ProductRemark" type="xsd:string" >
</xsd:element>
<xsd:element name="Note" type="xsd:string" >
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

Suggestion: use a column of type text or ntext type to store your XML, this will allow you to search for a specific value.
You can use varchar or nvarchar, but FULL TEXT Seach will not work with this type of data. So, go for the first option.

Good luck.

|||

Take a look at this arcticle. If you have any more questions let us know.

http://support.microsoft.com/kb/316005

|||

Hello Dave,

Thanks for the reply! I have read the article many times :) The problem is, the first level elements I want to be in the master table (WPXML) only work if the data if formatted like <Qty>1</Qty>. I can use <xsd:element name="Qty" type="xsd:integer" /> to get the value and place it in the master table. However, if the data is formatted like <PartType id= "6192"/> the app wants me to create a relationship in order to insert the data. I don't want this data in the product table, only in the master table.

So I guess I am not sure how to get those values without having use an annotation for relationship. If you look at the 2 tables, you will see what data I need to be in each table. I have spent almost 20 hours on this and I just cannot get it to work. Any more info would be greatly appreciated!

|||

Any one have an answer to my mapping problem?

|||

Add to your element:
sql:relation="WPXML" sql:relationship="test"

so that it now looks like

<xsd:element name="PartType" sql:relation="WPXML" sql:relationship="test">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:integer" sql:field="PartType" />
</xsd:complexType>
</xsd:element>

do this for each of the elements setting the right sql:relation and sql:relationship

|||

This is the error I am getting now:

--------
Windows Script Host
--------
Script: D:\test\bhavesh.vbs
Line: 5
Char: 1
Error: Schema: the parent/child table of the relationship on 'BaseVehicle' does not match.
Code: 80004005
Source: Schema mapping

--------
OK
--------

--------
Windows Script Host
--------
Script: D:\test\bhavesh.vbs
Line: 5
Char: 1
Error: Schema: unable to load schema 'bhavesh.xsd'. An error occurred (bhavesh.xsd#/schema[1]/element[position() = 1 and @.name = 'App']/element[position() = 1 and @.name = 'Product']
Element "xsd:element" is not allowed in this context.).
Code: 80004005
Source: Schema mapping

--------
OK
--------

Here is current Schema:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:annotation>
<xsd:appinfo>
<sql:relationship name="test"
parent="WPXML"
parent-key="Part"
child="WPPRODUCT"
child-key="Part" />
</xsd:appinfo>
</xsd:annotation>
<xsd:element name="App" sql:relation="WPXML" type="PSECP100_Data">
<xsd:complexType name="PSECP100_Data">
<xsd:sequence>
<xsd:element name="Qty" type="xsd:integer" />
<xsd:element name="Part" type="xsd:string" />
<xsd:element name="BaseVehicle" sql:relation="WPXML" sql:relationship="test">
<xsd:complexType>
<xsd:attribute name="BaseVehicle" type="xsd:integer" sql:field="BaseVehicle" />
</xsd:complexType>
</xsd:element>
<xsd:element name="PartType" sql:relation="WPXML" sql:relationship="test">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:integer" sql:field="PartType" />
</xsd:complexType>
</xsd:element>
<xsd:element name="EngineBase" sql:relation="WPXML" sql:relationship="test">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:integer" sql:field="EngineBase" />
</xsd:complexType>
</xsd:element>
<xsd:element name="EngineDesignation" sql:relation="WPXML" sql:relationship="test">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:integer" sql:field="EngineDesignation" />
</xsd:complexType>
</xsd:element>
<xsd:element name="ImageURL" type="xsd:string" />
<xsd:element name="ThumbURL" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Product" sql:relation="WPPRODUCT" sql:relationship="test" type="bhavesh" >
<xsd:complexType name="bhavesh">
<xsd:sequence>
<xsd:element name="Part" type="xsd:string" />
<xsd:element name="PartNumber" type="xsd:string" >
</xsd:element>
<xsd:element name="BrandID" type="xsd:string" >
</xsd:element>
<xsd:element name="BrandDescription" type="xsd:string" >
</xsd:element>
<xsd:element name="Price" type="xsd:string" >
</xsd:element>
<xsd:element name="ListPrice" type="xsd:string" >
</xsd:element>
<xsd:element name="Weight" type="xsd:string" >
</xsd:element>
<xsd:element name="Popularity" type="xsd:string" >
</xsd:element>
<xsd:element name="OEFlag" type="xsd:string" >
</xsd:element>
<xsd:element name="ProductRemark" type="xsd:string" >
</xsd:element>
<xsd:element name="Note" type="xsd:string" >
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:element>
</xsd:schema

|||

remove sql:relationship="test" from basevehicle.

If the error moves to the next node then we know that was causing the issue.

|||

same error:

Script: D:\test\bhavesh.vbs
Line: 5
Char: 1
Error: Schema: unable to load schema 'bhavesh.xsd'. An error occurred (bhavesh.xsd#/schema[1]/element[position() = 1 and @.name = 'App']/element[position() = 1 and @.name = 'Product']
Element "xsd:element" is not allowed in this context.).
Code: 80004005
Source: Schema mapping

I am close to giving up on this!!!

|||

Okay I took your schema and tried to validate it with xmlspy (http://www.altova.com) and it didn't validate.

Give this schema a try and see how it works out.

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema"><xsd:annotation><xsd:appinfo><sql:relationship name="test" parent="WPXML" parent-key="Part" child="WPPRODUCT" child-key="Part" /></xsd:appinfo></xsd:annotation><xsd:element name="App" sql:relation="WPXML"><xsd:complexType><xsd:sequence> <xsd:element name="Qty" type="xsd:integer" /><xsd:element name="Part" type="xsd:string" /><xsd:element name="BaseVehicle" sql:relation="WPXML" sql:relationship="test"> <xsd:complexType><xsd:attribute name="BaseVehicle" type="xsd:integer" sql:field="BaseVehicle" /> </xsd:complexType></xsd:element><xsd:element name="PartType" sql:relation="WPXML" sql:relationship="test"> <xsd:complexType><xsd:attribute name="id" type="xsd:integer" sql:field="PartType" /></xsd:complexType></xsd:element><xsd:element name="EngineBase" sql:relation="WPXML" sql:relationship="test"> <xsd:complexType><xsd:attribute name="id" type="xsd:integer" sql:field="EngineBase" /></xsd:complexType></xsd:element><xsd:element name="EngineDesignation" sql:relation="WPXML" sql:relationship="test"> <xsd:complexType><xsd:attribute name="id" type="xsd:integer" sql:field="EngineDesignation" /></xsd:complexType></xsd:element><xsd:element name="ImageURL" type="xsd:string" /><xsd:element name="ThumbURL" type="xsd:string" /></xsd:sequence></xsd:complexType></xsd:element> <xsd:element name="Product" sql:relation="WPPRODUCT" sql:relationship="test"> <xsd:complexType> <xsd:sequence> <xsd:element name="Part" type="xsd:string" /> <xsd:element name="PartNumber" type="xsd:string" > </xsd:element> <xsd:element name="BrandID" type="xsd:string" > </xsd:element> <xsd:element name="BrandDescription" type="xsd:string" > </xsd:element> <xsd:element name="Price" type="xsd:string" > </xsd:element> <xsd:element name="ListPrice" type="xsd:string" > </xsd:element> <xsd:element name="Weight" type="xsd:string" > </xsd:element> <xsd:element name="Popularity" type="xsd:string" > </xsd:element> <xsd:element name="OEFlag" type="xsd:string" > </xsd:element> <xsd:element name="ProductRemark" type="xsd:string" > </xsd:element> <xsd:element name="Note" type="xsd:string" > </xsd:element> </xsd:sequence> </xsd:complexType></xsd:element></xsd:schema>
|||

Hello Dave, almost there! I really appreciate your assistance on this :)

Here is my problem... everything is working perfect with the schema below except I cannot seem to get the values for any element when the value is an attribute of the element. You will see the element <BaseVehicle id="5899" /> in the example of the XML in my original post, it seems my schema would work if the data was formatted like <BaseVehicle>5899</Basevehicle> any ideas on how to get those values without having to store the value in both tables?

Schema:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:annotation>
<xsd:appinfo>
<sql:relationship name="PartNumbers"
parent="WPXML"
parent-key="Part"
child="WPPRODUCT"
child-key="Part" />
</xsd:appinfo>
</xsd:annotation>
<xsd:element name="App" sql:relation="WPXML" type="b"/>
<xsd:complexType name="b">
<xsd:sequence>
<xsd:element name="Qty" type="xsd:integer" sql:field="Qty"/>
<xsd:element name="BaseVehicle" sql:field="BaseVehicle" type="xsd:integer"/>
<xsd:element name="PartType" sql:field="PartType" type="xsd:integer"/>
<xsd:element name="EngineBase" sql:field="EngineBase" type="xsd:integer"/>
<xsd:element name="EngineDesignation" sql:field="EngineDesignation" type="xsd:integer"/>
<xsd:element name="ImageURL" type="xsd:string"/>
<xsd:element name="ThumbURL" type="xsd:string"/>
<xsd:element name="Note" type="xsd:string" sql:field="Note"/>
<xsd:element name="Part" type="xsd:string" sql:field="Part"/>
<xsd:element ref="Product" sql:relationship="PartNumbers" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="id" sql:field="PartType" type="xsd:integer" />
</xsd:complexType>
<xsd:element name="Product" sql:relation="WPPRODUCT" type="bhavesh" />
<xsd:complexType name="bhavesh">
<xsd:sequence>
<xsd:element name="Part" type="xsd:string" sql:field="Part"/>
<xsd:element name="PartNumber" type="xsd:string" sql:field="PartNumber"/>
<xsd:element name="BrandID" type="xsd:string" sql:field="BrandID"/>
<xsd:element name="BrandDescription" type="xsd:string" sql:field="BrandDescription"/>
<xsd:element name="Price" type="xsd:string" sql:field="Price"/>
<xsd:element name="ListPrice" type="xsd:string" sql:field="ListPrice"/>
<xsd:element name="Weight" type="xsd:string" sql:field="Weight"/>
<xsd:element name="Popularity" type="xsd:string" sql:field="Popularity"/>
<xsd:element name="OEFlag" type="xsd:string" sql:field="OEFlag"/>
<xsd:element name="ProductRemark" type="xsd:string" sql:field="ProductRemark"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>

|||

only part that looks to be missing is your sql:relation for each of the xsd:element and xsd:attribute. That will it which table / field it belongs with. Otherwise its going to want to put in both.

|||

I have changed the schema to the below. The problem is, because I changed the basevehicle elament to:
<xsd:element name='BaseVehicle' sql:relation="WPXML">
<xsd:complexType>
<xsd:attribute name='id' sql:field="BaseVehicle" type="xsd:integer"/>
</xsd:complexType>
</xsd:element>

It now wants me to add a relationship, but I don't want these values in both tables, I only want them in the first. Do I have to store the attribute data in 2 tables or is there a way to get the data without adding it to both?

schema:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:annotation>
<xsd:appinfo>
<sql:relationship name="PartNumbers" parent="WPXML" parent-key="Part" child="WPPRODUCT" child-key="Part" />
</xsd:appinfo>
</xsd:annotation>

<xsd:element name="App" sql:relation="WPXML" type="b"/>
<xsd:complexType name="b">
<xsd:sequence>
<xsd:element name="Qty" type="xsd:integer" sql:field="Qty"/>
<xsd:element name='BaseVehicle' sql:relation="WPXML">
<xsd:complexType>
<xsd:attribute name='id' sql:field="BaseVehicle" type="xsd:integer"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="PartType" sql:field="PartType" type="xsd:integer"/>
<xsd:element name="EngineBase" sql:field="EngineBase" type="xsd:integer"/>
<xsd:element name="EngineDesignation" sql:field="EngineDesignation" type="xsd:integer"/>
<xsd:element name="ImageURL" type="xsd:string"/>
<xsd:element name="ThumbURL" type="xsd:string"/>
<xsd:element name="Note" type="xsd:string" sql:field="Note"/>
<xsd:element name="Part" type="xsd:string" sql:field="Part"/>
<xsd:element ref="Product" sql:relationship="PartNumbers" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>

<xsd:element name="Product" sql:relation="WPPRODUCT" type="bhavesh" />
<xsd:complexType name="bhavesh">
<xsd:sequence>
<xsd:element name="Part" type="xsd:string" sql:field="Part"/>
<xsd:element name="PartNumber" type="xsd:string" sql:field="PartNumber"/>
<xsd:element name="BrandID" type="xsd:string" sql:field="BrandID"/>
<xsd:element name="BrandDescription" type="xsd:string" sql:field="BrandDescription"/>
<xsd:element name="Price" type="xsd:string" sql:field="Price"/>
<xsd:element name="ListPrice" type="xsd:string" sql:field="ListPrice"/>
<xsd:element name="Weight" type="xsd:string" sql:field="Weight"/>
<xsd:element name="Popularity" type="xsd:string" sql:field="Popularity"/>
<xsd:element name="OEFlag" type="xsd:string" sql:field="OEFlag"/>
<xsd:element name="ProductRemark" type="xsd:string" sql:field="ProductRemark"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>

|||

Where does it asking you to add the relationship. I see you have the ref element on the Part branch, but I'm not seeing the relationship added to the product branch.

|||

Hi,

Does the bulkload works for xml to sql no matter if itshierarchical xml?

because I'm trying to do my schema file too

Anyone knows a good tutorial for making schemas?

Thanks in advance!

Friday, February 24, 2012

Import Analysis Services 2005 cube into Siebel Analytics

Hi,

I'm trying to import a cube I've created with Analysis Services 2005 into Siebel Analytics Physical Layer.

I've installed XML For Analysis SDK on the SQL Server and created a virtual directory which contains the file msxisapi.dll.

When I try to import I get the following error message fro the server :"Error proccesing request".

I think the problem occurs because the xmla service doesn't "know" I want to import the cube from it.

I'm very new to the issue and we don't have knowledge in our company to solve the problem.

I'll very appreciate it if someone could help me.

Thanks in Advance,

Moving to the SQL Server Analysis Services forum.

import an xml-file to sql2005

Dear all,
I'm trying to import an xml-file by passing the path i.e.
"D:\sql\project\bill_count_1.xml" to an db-procedure as in-param.
As a result whole the file-content should be saved in one column.
using SQL-2005.
The table looks like
create table test
(
id identity
, doc xml
)
You can solve the problem with openxml, openrowset, bulk insert and bcp
if you use the path as a string directly in the code but I could'nt
manage the import by sending the file-path as in-param to a db-proc
Thanks,
Every kind of help appr.
BR
AnwarHello anwar,
There's isn't any magic proc that does this for you. it can use dynamic SQL
inside of your own proc and openrowset to make this happen.
Cheers,
Kent Tegels
http://staff.develop.com/ktegels/

import an xml-file to sql2005

Dear all,
I'm trying to import an xml-file by passing the path i.e.
"D:\sql\project\bill_count_1.xml" to an db-procedure as in-param.
As a result whole the file-content should be saved in one column.
using SQL-2005.
The table looks like
create table test
(
id identity
, doc xml
)
You can solve the problem with openxml, openrowset, bulk insert and bcp
if you use the path as a string directly in the code but I could'nt
manage the import by sending the file-path as in-param to a db-proc
Thanks,
Every kind of help appr.
BR
AnwarHello anwar,
There's isn't any magic proc that does this for you. it can use dynamic SQL
inside of your own proc and openrowset to make this happen.
Cheers,
Kent Tegels
http://staff.develop.com/ktegels/

import an xml-file to sql2005

Dear all,
I'm trying to import an xml-file by passing the path i.e.
"D:\sql\project\bill_count_1.xml" to an db-procedure as in-param.
As a result whole the file-content should be saved in one column.
using SQL-2005.
The table looks like
create table test
(
id identity
, doc xml
)
You can solve the problem with openxml, openrowset, bulk insert and bcp
if you use the path as a string directly in the code but I could'nt
manage the import by sending the file-path as in-param to a db-proc
Thanks,
Every kind of help appr.
BR
Anwar
Hello anwar,
There's isn't any magic proc that does this for you. it can use dynamic SQL
inside of your own proc and openrowset to make this happen.
Cheers,
Kent Tegels
http://staff.develop.com/ktegels/

Import a XML file..?

Hi all,
I'm new to XML.
How can I import a XML-file to a SQL-table?
/Kent J.
Do you want the XML to be imported relationally? That is, into separate
tables?
Or do you just want to store the xml as text
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:FStgd.7428$d5.62954@.newsb.telia.net...
> Hi all,
> I'm new to XML.
> How can I import a XML-file to a SQL-table?
> /Kent J.
>
>
|||Jeff,
The XML-file consists of data about our customers - Customernumber,Address,
PhoneNumber and so on.
I would like the data to be stored in a single SQL-table.
/Kent J.
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
> Do you want the XML to be imported relationally? That is, into separate
> tables?
> Or do you just want to store the xml as text
> Jeff
> "Kent Johnson" <08.6044303@.telia.com> wrote in message
> news:FStgd.7428$d5.62954@.newsb.telia.net...
>
|||Look in Books Online under Writing XML using OPENXML
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:pDugd.7430$d5.63053@.newsb.telia.net...
> Jeff,
> The XML-file consists of data about our customers -
Customernumber,Address,
> PhoneNumber and so on.
> I would like the data to be stored in a single SQL-table.
> /Kent J.
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
>
|||Check out:
http://msdn.microsoft.com/library/de...ml/sql01c5.asp
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:FStgd.7428$d5.62954@.newsb.telia.net...
Hi all,
I'm new to XML.
How can I import a XML-file to a SQL-table?
/Kent J.
|||OK! I have read 'Writing XML Using OPENXML'
I understand that I first have to prepare the document with:
sp_xml_preparedocument
and then run....
OPENXML
But I'm not closer to solve the problem.
Can you describe how to import a XML-file into a SQL-table in a step-by-step
instruction?
/Kent J.
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> Look in Books Online under Writing XML using OPENXML
> Jeff
> "Kent Johnson" <08.6044303@.telia.com> wrote in message
> news:pDugd.7430$d5.63053@.newsb.telia.net...
> Customernumber,Address,
separate
>
|||The docs have working examples..did you get one of those working? They are
very similar to your requirements.
You are familar with INSERT vs SELECT, correct?
Sorry, but I won't write the code for you. If you have a specific question,
I would be happy to assist.
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:Nbvgd.7438$d5.62925@.newsb.telia.net...
> OK! I have read 'Writing XML Using OPENXML'
> I understand that I first have to prepare the document with:
> sp_xml_preparedocument
> and then run....
> OPENXML
> But I'm not closer to solve the problem.
> Can you describe how to import a XML-file into a SQL-table in a
step-by-step
> instruction?
> /Kent J.
>
>
>
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> separate
>
|||You might want to venture to http://sqlxml.org for great info.
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:Nbvgd.7438$d5.62925@.newsb.telia.net...
> OK! I have read 'Writing XML Using OPENXML'
> I understand that I first have to prepare the document with:
> sp_xml_preparedocument
> and then run....
> OPENXML
> But I'm not closer to solve the problem.
> Can you describe how to import a XML-file into a SQL-table in a
step-by-step
> instruction?
> /Kent J.
>
>
>
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> separate
>

Import a XML file..?

Hi all,
I'm new to XML.
How can I import a XML-file to a SQL-table?
/Kent J.Do you want the XML to be imported relationally? That is, into separate
tables?
Or do you just want to store the xml as text
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:FStgd.7428$d5.62954@.newsb.telia.net...
> Hi all,
> I'm new to XML.
> How can I import a XML-file to a SQL-table?
> /Kent J.
>
>|||Jeff,
The XML-file consists of data about our customers - Customernumber,Address,
PhoneNumber and so on.
I would like the data to be stored in a single SQL-table.
/Kent J.
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
> Do you want the XML to be imported relationally? That is, into separate
> tables?
> Or do you just want to store the xml as text
> Jeff
> "Kent Johnson" <08.6044303@.telia.com> wrote in message
> news:FStgd.7428$d5.62954@.newsb.telia.net...
>|||Look in Books Online under Writing XML using OPENXML
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:pDugd.7430$d5.63053@.newsb.telia.net...
> Jeff,
> The XML-file consists of data about our customers -
Customernumber,Address,
> PhoneNumber and so on.
> I would like the data to be stored in a single SQL-table.
> /Kent J.
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
>|||Check out:
http://msdn.microsoft.com/library/d... />
ql01c5.asp
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:FStgd.7428$d5.62954@.newsb.telia.net...
Hi all,
I'm new to XML.
How can I import a XML-file to a SQL-table?
/Kent J.|||OK! I have read 'Writing XML Using OPENXML'
I understand that I first have to prepare the document with:
sp_xml_preparedocument
and then run....
OPENXML
But I'm not closer to solve the problem.
Can you describe how to import a XML-file into a SQL-table in a step-by-step
instruction?
/Kent J.
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> Look in Books Online under Writing XML using OPENXML
> Jeff
> "Kent Johnson" <08.6044303@.telia.com> wrote in message
> news:pDugd.7430$d5.63053@.newsb.telia.net...
> Customernumber,Address,
separate[vbcol=seagreen]
>|||The docs have working examples..did you get one of those working' They are
very similar to your requirements.
You are familar with INSERT vs SELECT, correct?
Sorry, but I won't write the code for you. If you have a specific question,
I would be happy to assist.
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:Nbvgd.7438$d5.62925@.newsb.telia.net...
> OK! I have read 'Writing XML Using OPENXML'
> I understand that I first have to prepare the document with:
> sp_xml_preparedocument
> and then run....
> OPENXML
> But I'm not closer to solve the problem.
> Can you describe how to import a XML-file into a SQL-table in a
step-by-step
> instruction?
> /Kent J.
>
>
>
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> separate
>|||You might want to venture to http://sqlxml.org for great info.
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:Nbvgd.7438$d5.62925@.newsb.telia.net...
> OK! I have read 'Writing XML Using OPENXML'
> I understand that I first have to prepare the document with:
> sp_xml_preparedocument
> and then run....
> OPENXML
> But I'm not closer to solve the problem.
> Can you describe how to import a XML-file into a SQL-table in a
step-by-step
> instruction?
> /Kent J.
>
>
>
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> separate
>

Import a XML file..?

Hi all,
I'm new to XML.
How can I import a XML-file to a SQL-table?
/Kent J.Do you want the XML to be imported relationally? That is, into separate
tables?
Or do you just want to store the xml as text
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:FStgd.7428$d5.62954@.newsb.telia.net...
> Hi all,
> I'm new to XML.
> How can I import a XML-file to a SQL-table?
> /Kent J.
>
>|||Jeff,
The XML-file consists of data about our customers - Customernumber,Address,
PhoneNumber and so on.
I would like the data to be stored in a single SQL-table.
/Kent J.
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
> Do you want the XML to be imported relationally? That is, into separate
> tables?
> Or do you just want to store the xml as text
> Jeff
> "Kent Johnson" <08.6044303@.telia.com> wrote in message
> news:FStgd.7428$d5.62954@.newsb.telia.net...
> > Hi all,
> >
> > I'm new to XML.
> > How can I import a XML-file to a SQL-table?
> >
> > /Kent J.
> >
> >
> >
>|||Look in Books Online under Writing XML using OPENXML
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:pDugd.7430$d5.63053@.newsb.telia.net...
> Jeff,
> The XML-file consists of data about our customers -
Customernumber,Address,
> PhoneNumber and so on.
> I would like the data to be stored in a single SQL-table.
> /Kent J.
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
> > Do you want the XML to be imported relationally? That is, into separate
> > tables?
> >
> > Or do you just want to store the xml as text
> >
> > Jeff
> >
> > "Kent Johnson" <08.6044303@.telia.com> wrote in message
> > news:FStgd.7428$d5.62954@.newsb.telia.net...
> > > Hi all,
> > >
> > > I'm new to XML.
> > > How can I import a XML-file to a SQL-table?
> > >
> > > /Kent J.
> > >
> > >
> > >
> >
> >
>|||Check out:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlpro01/html/sql01c5.asp
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:FStgd.7428$d5.62954@.newsb.telia.net...
Hi all,
I'm new to XML.
How can I import a XML-file to a SQL-table?
/Kent J.|||OK! I have read 'Writing XML Using OPENXML'
I understand that I first have to prepare the document with:
sp_xml_preparedocument
and then run....
OPENXML
But I'm not closer to solve the problem.
Can you describe how to import a XML-file into a SQL-table in a step-by-step
instruction?
/Kent J.
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> Look in Books Online under Writing XML using OPENXML
> Jeff
> "Kent Johnson" <08.6044303@.telia.com> wrote in message
> news:pDugd.7430$d5.63053@.newsb.telia.net...
> > Jeff,
> >
> > The XML-file consists of data about our customers -
> Customernumber,Address,
> > PhoneNumber and so on.
> > I would like the data to be stored in a single SQL-table.
> >
> > /Kent J.
> >
> >
> >
> > "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> > news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
> > > Do you want the XML to be imported relationally? That is, into
separate
> > > tables?
> > >
> > > Or do you just want to store the xml as text
> > >
> > > Jeff
> > >
> > > "Kent Johnson" <08.6044303@.telia.com> wrote in message
> > > news:FStgd.7428$d5.62954@.newsb.telia.net...
> > > > Hi all,
> > > >
> > > > I'm new to XML.
> > > > How can I import a XML-file to a SQL-table?
> > > >
> > > > /Kent J.
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||The docs have working examples..did you get one of those working' They are
very similar to your requirements.
You are familar with INSERT vs SELECT, correct?
Sorry, but I won't write the code for you. If you have a specific question,
I would be happy to assist.
Jeff
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:Nbvgd.7438$d5.62925@.newsb.telia.net...
> OK! I have read 'Writing XML Using OPENXML'
> I understand that I first have to prepare the document with:
> sp_xml_preparedocument
> and then run....
> OPENXML
> But I'm not closer to solve the problem.
> Can you describe how to import a XML-file into a SQL-table in a
step-by-step
> instruction?
> /Kent J.
>
>
>
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> > Look in Books Online under Writing XML using OPENXML
> >
> > Jeff
> >
> > "Kent Johnson" <08.6044303@.telia.com> wrote in message
> > news:pDugd.7430$d5.63053@.newsb.telia.net...
> > > Jeff,
> > >
> > > The XML-file consists of data about our customers -
> > Customernumber,Address,
> > > PhoneNumber and so on.
> > > I would like the data to be stored in a single SQL-table.
> > >
> > > /Kent J.
> > >
> > >
> > >
> > > "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> > > news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
> > > > Do you want the XML to be imported relationally? That is, into
> separate
> > > > tables?
> > > >
> > > > Or do you just want to store the xml as text
> > > >
> > > > Jeff
> > > >
> > > > "Kent Johnson" <08.6044303@.telia.com> wrote in message
> > > > news:FStgd.7428$d5.62954@.newsb.telia.net...
> > > > > Hi all,
> > > > >
> > > > > I'm new to XML.
> > > > > How can I import a XML-file to a SQL-table?
> > > > >
> > > > > /Kent J.
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||You might want to venture to http://sqlxml.org for great info.
"Kent Johnson" <08.6044303@.telia.com> wrote in message
news:Nbvgd.7438$d5.62925@.newsb.telia.net...
> OK! I have read 'Writing XML Using OPENXML'
> I understand that I first have to prepare the document with:
> sp_xml_preparedocument
> and then run....
> OPENXML
> But I'm not closer to solve the problem.
> Can you describe how to import a XML-file into a SQL-table in a
step-by-step
> instruction?
> /Kent J.
>
>
>
>
> "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> news:#QXQgodvEHA.2116@.TK2MSFTNGP14.phx.gbl...
> > Look in Books Online under Writing XML using OPENXML
> >
> > Jeff
> >
> > "Kent Johnson" <08.6044303@.telia.com> wrote in message
> > news:pDugd.7430$d5.63053@.newsb.telia.net...
> > > Jeff,
> > >
> > > The XML-file consists of data about our customers -
> > Customernumber,Address,
> > > PhoneNumber and so on.
> > > I would like the data to be stored in a single SQL-table.
> > >
> > > /Kent J.
> > >
> > >
> > >
> > > "Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
> > > news:#s#eqbdvEHA.1988@.TK2MSFTNGP12.phx.gbl...
> > > > Do you want the XML to be imported relationally? That is, into
> separate
> > > > tables?
> > > >
> > > > Or do you just want to store the xml as text
> > > >
> > > > Jeff
> > > >
> > > > "Kent Johnson" <08.6044303@.telia.com> wrote in message
> > > > news:FStgd.7428$d5.62954@.newsb.telia.net...
> > > > > Hi all,
> > > > >
> > > > > I'm new to XML.
> > > > > How can I import a XML-file to a SQL-table?
> > > > >
> > > > > /Kent J.
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

Sunday, February 19, 2012

Implimenting additional export types

Is it possible to add additional export types to the list, link to sample
code would be nice.
Select a format (Export)
XML file with report data
CSV (somma delimited)
TIFF file
Acrobat (PDF) file
Web archive
Excel
-- MY NEW TYPE --
Regards,
JohnGuess not :(
"John J. Hughes II" <no@.invalid.com> wrote in message
news:eOwBwc1pGHA.4760@.TK2MSFTNGP05.phx.gbl...
> Is it possible to add additional export types to the list, link to sample
> code would be nice.
> Select a format (Export)
> XML file with report data
> CSV (somma delimited)
> TIFF file
> Acrobat (PDF) file
> Web archive
> Excel
> -- MY NEW TYPE --
> Regards,
> John
>