Showing posts with label save. Show all posts
Showing posts with label save. Show all posts

Thursday, March 29, 2012

Extract Data From A Table & Save As An XML File

Hello Everyone,
I am trying to extract data from from my Hit list and save as a file in XML
format.
I create a stored proc called it as stProblemClients
I wrote: Select * from clients where status = 'Not Dead'
I set a schedule stProblemClients to run daily so I canmonitor my contracted
jobs
I need the output to be saved in an XML format. Are there any small utility
out there? or any way pieces of code I can mimic?
Let me know if you need to resolve a non technical problem.
Grascia.
Vito CorleoneAre you using SQL Server 2005? Did you look at exposing the stored proc as a
webservice?
Or use FOR XML in the database and use Management Studio to take the
generated XML and save it into a file?
Best regards
Michael
"Vito Corleone" <VitoCorleone@.discussions.microsoft.com> wrote in message
news:982EE5DF-F39B-4582-8FB0-BC8FC324EB56@.microsoft.com...
> Hello Everyone,
> I am trying to extract data from from my Hit list and save as a file in
> XML
> format.
> I create a stored proc called it as stProblemClients
> I wrote: Select * from clients where status = 'Not Dead'
> I set a schedule stProblemClients to run daily so I canmonitor my
> contracted
> jobs
> I need the output to be saved in an XML format. Are there any small
> utility
> out there? or any way pieces of code I can mimic?
> Let me know if you need to resolve a non technical problem.
> Grascia.
> Vito Corleone

Extract Data From A Table & Save As An XML File

Hello Everyone,
I am trying to extract data from from my Hit list and save as a file in XML
format.
I create a stored proc called it as stProblemClients
I wrote: Select * from clients where status = 'Not Dead'
I set a schedule stProblemClients to run daily so I canmonitor my contracted
jobs
I need the output to be saved in an XML format. Are there any small utility
out there? or any way pieces of code I can mimic?
Let me know if you need to resolve a non technical problem.
Grascia.
Vito Corleone
Are you using SQL Server 2005? Did you look at exposing the stored proc as a
webservice?
Or use FOR XML in the database and use Management Studio to take the
generated XML and save it into a file?
Best regards
Michael
"Vito Corleone" <VitoCorleone@.discussions.microsoft.com> wrote in message
news:982EE5DF-F39B-4582-8FB0-BC8FC324EB56@.microsoft.com...
> Hello Everyone,
> I am trying to extract data from from my Hit list and save as a file in
> XML
> format.
> I create a stored proc called it as stProblemClients
> I wrote: Select * from clients where status = 'Not Dead'
> I set a schedule stProblemClients to run daily so I canmonitor my
> contracted
> jobs
> I need the output to be saved in an XML format. Are there any small
> utility
> out there? or any way pieces of code I can mimic?
> Let me know if you need to resolve a non technical problem.
> Grascia.
> Vito Corleone
sql

Sunday, February 19, 2012

Exporting to Excel format

Quite often, when a user exports to an Excel spreadsheet and selects "Open"
instead of "Save" for the file download dialog the file does not open.
Instead, they get an error saying "xxxxx.xls could not be found. Check the
spelling of the file name, and verify that the location is correct". This
seems to happen more often than not.
Is there anything which can be done about this? The problem doesn't occur if
they save the file instead of opening it, but they should not have to
perform extra steps for what should be a simple operation.
PeterThis is a bug. You have identified the workaround: Save the file to the
local machine and then open it. At this time I cannot give you any specific
guidance when a fix might be available.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Kenyon" <p.kenyon.no.spam@.paradise.net.nz> wrote in message
news:%23XZJHuPdEHA.3572@.TK2MSFTNGP10.phx.gbl...
> Quite often, when a user exports to an Excel spreadsheet and selects
"Open"
> instead of "Save" for the file download dialog the file does not open.
> Instead, they get an error saying "xxxxx.xls could not be found. Check the
> spelling of the file name, and verify that the location is correct". This
> seems to happen more often than not.
> Is there anything which can be done about this? The problem doesn't occur
if
> they save the file instead of opening it, but they should not have to
> perform extra steps for what should be a simple operation.
> Peter
>

Wednesday, February 15, 2012

EXPORTING SQL.XML data to file

I have a similar problem to that of Barry van Dijk
I need to save SQL.2000 Invoice Data as an XML structured file in a
designated directory for FORMSCAPE to {print|e-mail|fax + archive}, each
filename needs to be based on INVOICE number.
Whilst I understand Select .. FOR XML, doing something v.useful with it
{save to file} is taxing my brain! This process must be automatic (stored
proc.)
Simon Bateman
In SQL Server 2000, it is not easy to save any data to a file in the server.
Recommended is to write a small client app that streams the result stream of
the ADO/ADO.Net XML result generated by the FOR XML into a file stream.
If it really has to be done on the server, in SQL Server 2000, you would
have to call the above client app via the sp_OA stored procedures. In SQL
Server 2005, you can use the CLR to write a user-defined function to do so.
Best regards
Michael
"SimonBA" <SimonBA@.discussions.microsoft.com> wrote in message
news:A93EAF21-F891-4897-96BE-AC5184B47B42@.microsoft.com...
>I have a similar problem to that of Barry van Dijk
> I need to save SQL.2000 Invoice Data as an XML structured file in a
> designated directory for FORMSCAPE to {print|e-mail|fax + archive}, each
> filename needs to be based on INVOICE number.
> Whilst I understand Select .. FOR XML, doing something v.useful with it
> {save to file} is taxing my brain! This process must be automatic (stored
> proc.)
> --
> Simon Bateman

EXPORTING SQL.XML data to file

I have a similar problem to that of Barry van Dijk
I need to save SQL.2000 Invoice Data as an XML structured file in a
designated directory for FORMSCAPE to {print|e-mail|fax + archive}, each
filename needs to be based on INVOICE number.
Whilst I understand Select .. FOR XML, doing something v.useful with it
{save to file} is taxing my brain! This process must be automatic (stored
proc.)
Simon BatemanIn SQL Server 2000, it is not easy to save any data to a file in the server.
Recommended is to write a small client app that streams the result stream of
the ADO/ADO.Net XML result generated by the FOR XML into a file stream.
If it really has to be done on the server, in SQL Server 2000, you would
have to call the above client app via the sp_OA stored procedures. In SQL
Server 2005, you can use the CLR to write a user-defined function to do so.
Best regards
Michael
"SimonBA" <SimonBA@.discussions.microsoft.com> wrote in message
news:A93EAF21-F891-4897-96BE-AC5184B47B42@.microsoft.com...
>I have a similar problem to that of Barry van Dijk
> I need to save SQL.2000 Invoice Data as an XML structured file in a
> designated directory for FORMSCAPE to {print|e-mail|fax + archive}, each
> filename needs to be based on INVOICE number.
> Whilst I understand Select .. FOR XML, doing something v.useful with it
> {save to file} is taxing my brain! This process must be automatic (stored
> proc.)
> --
> Simon Bateman