Wednesday, March 28, 2012
Read xml file, store data in db. What could be easier?
I am going to receive an xml doc and am going to have to parse the data
values and store them in the database. About 10 db tables are targets for the
data, with repeating groups of data and such. I have not done this with Sql
Server before. I need to be pointed in the right direction. So start
pointing!
Thanks,
Michael
These xpath query samples are suitable for COM and
for .NET.
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
Earn $$$ money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp
"Snake" <Snake@.discussions.microsoft.com> wrote in message
news:58E7DD5B-CEAF-4677-902A-0A7BBBF0DA30@.microsoft.com...
> OK guys,
> I am going to receive an xml doc and am going to have to parse the data
> values and store them in the database. About 10 db tables are targets for
> the
> data, with repeating groups of data and such. I have not done this with
> Sql
> Server before. I need to be pointed in the right direction. So start
> pointing!
> Thanks,
> Michael
sql
Read Value from XML
DECLARE @.idoc int
DECLARE @.doc varchar(4000)
SET @.doc ='
<NEWDATASET>
<TABLE1>
<INTERO>1</INTERO>
</TABLE1>
</NEWDATASET> '
EXEC sp_xml_preparedocument @.idoc OUTPUT, @.doc
Select * FROM OPENXML (@.idoc, '/NEWDATASET/TABLE1',1)
WITH (INTERO int)
Not function, why?
John,
You need to identify the element in the WITH clause... also, don't forget to
remove the document reference when you're done:
DECLARE @.idoc int
DECLARE @.doc varchar(4000)
SET @.doc ='
<NEWDATASET>
<TABLE1>
<INTERO>1</INTERO>
</TABLE1>
</NEWDATASET> '
EXEC sp_xml_preparedocument @.idoc OUTPUT, @.doc
Select * FROM OPENXML (@.idoc, '/NEWDATASET/TABLE1',1)
WITH (INTERO int 'INTERO')
exec sp_xml_removedocument @.idoc
"John" <ch@.msn.com> wrote in message
news:%23id3kIfsEHA.2128@.TK2MSFTNGP11.phx.gbl...
> This is My example :
> DECLARE @.idoc int
> DECLARE @.doc varchar(4000)
> SET @.doc ='
> <NEWDATASET>
> <TABLE1>
> <INTERO>1</INTERO>
> </TABLE1>
> </NEWDATASET> '
> EXEC sp_xml_preparedocument @.idoc OUTPUT, @.doc
> Select * FROM OPENXML (@.idoc, '/NEWDATASET/TABLE1',1)
> WITH (INTERO int)
>
> Not function, why?
>
Friday, March 23, 2012
Read of XML File
I do have XML file in c:\project.xml, this file is arround 60 MB file.
Now i want to use
EXEC sp_xml_preparedocument @.idoc OUTPUT, @.doc and then OPENXML to load xml
into sql server table, so how can i pass that xml file to
EXEC sp_xml_preparedocument
Pls helpTry this:
http://www.sqlxml.org/faqs.aspx?faq=39
--
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"mvp" <mvp@.discussions.microsoft.com> wrote in message
news:B51412BA-DDD2-443C-97B4-4E4E76358A2E@.microsoft.com...
> Hello,
> I do have XML file in c:\project.xml, this file is arround 60 MB file.
> Now i want to use
> EXEC sp_xml_preparedocument @.idoc OUTPUT, @.doc and then OPENXML to load
xml
> into sql server table, so how can i pass that xml file to
> EXEC sp_xml_preparedocument
> Pls help|||Is there anyway so that i c an do bulk load..because my .xml file is very
big, arround 60MB. Pls let me know
"Narayana Vyas Kondreddi" wrote:
> Try this:
> http://www.sqlxml.org/faqs.aspx?faq=39
> --
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "mvp" <mvp@.discussions.microsoft.com> wrote in message
> news:B51412BA-DDD2-443C-97B4-4E4E76358A2E@.microsoft.com...
> xml
>
>
Wednesday, March 21, 2012
Read / Write Into .doc From SQL Stored Procedure
I need to create a flat file as word document, may i know how to write text from stored procedure if a file is already exist then the text will append, how to do it ?
Thank you.
Often, the quality of the responses received is related to our ability to ‘bounce’ ideas off of each other. In the future, to make it easier for us to offer you assistance, and to prevent folks from wasting time on already answered questions, please don't post to multiple newsgroups. Choose the one that best fits your question and post there. Only post to another newsgroup if you get no answer in a day or two (or if you accidentally posted to the wrong newsgroup –and you indicate that you've already posted elsewhere).
Friday, March 9, 2012
rdl to word doc ?
Hi,
Can anyone assist me to convert .rdl files into an word file ?
Shall i need to write a program ?
Regards
Harsh
I think this is coming in RS2008.In the meantime could try creating a webservice which creates the report as pdf, then just get a 3rd party component to convert the pdf to word.
or try this:
http://aspalliance.com/1080_Video_Generate_Microsoft_Word_Reports_From_SQL_Reporting_Services