I'm on a shared server with no DTS capabilities. Is it possible to use a
stored procedure to export data from an SQL recordset into an XML file on a
remote server? i.e. I would need to create http://mydomain/myfile.xml
Anyone have sample code?
thanksYour web site appears to be down. Have a look at for xml explicit. This can
be used in a stored procedure to do exactly what you are looking for.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"shank" <shank@.tampabay.rr.com> wrote in message
news:uupZSE$DGHA.3000@.TK2MSFTNGP14.phx.gbl...
> I'm on a shared server with no DTS capabilities. Is it possible to use a
> stored procedure to export data from an SQL recordset into an XML file on
> a remote server? i.e. I would need to create http://mydomain/myfile.xml
> Anyone have sample code?
> thanks
>|||I have the below code that generates XML.
How do I get this into an XML file on a remote server?
Example: http://www.mydomain.com/mytestfile.xml (ficticious domain name)
Does this need to be done through ASP?
Or can I go direct from SQL to an XML file? (preferred)
thanks
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[xTest]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[xTest]
GO
CREATE TABLE [dbo].[xTest] (
[SkuNo] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Descrip] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
INSERT INTO dbo.xTest (SkuNo, Descrip, Type) VALUES ('Sku1', 'Descrip1',
'Type1')
INSERT INTO dbo.xTest (SkuNo, Descrip, Type) VALUES ('Sku2', 'Descrip2',
'Type2')
INSERT INTO dbo.xTest (SkuNo, Descrip, Type) VALUES ('Sku3', 'Descrip3',
'Type3')
INSERT INTO dbo.xTest (SkuNo, Descrip, Type) VALUES ('Sku4', 'Descrip4',
'Type4')
INSERT INTO dbo.xTest (SkuNo, Descrip, Type) VALUES ('Sku5', 'Descrip5',
'Type5')
INSERT INTO dbo.xTest (SkuNo, Descrip, Type) VALUES ('Sku6', 'Descrip6',
'Type6')
INSERT INTO dbo.xTest (SkuNo, Descrip, Type) VALUES ('Sku7', 'Descrip7',
'Type7')
INSERT INTO dbo.xTest (SkuNo, Descrip, Type) VALUES ('Sku8', 'Descrip8',
'Type8')
INSERT INTO dbo.xTest (SkuNo, Descrip, Type) VALUES ('Sku9', 'Descrip9',
'Type9')
SELECT 1 as Tag, NULL as Parent,
SkuNo AS [Stock!1!SkuNo],
Descrip AS [Stock!1!Descrip],
Type AS [Stock!1!Type]
FROM xTest
FOR XML EXPLICIT|||Hi
Look at http://www.perfectxml.com/Articles/XML/ExportSQLXML.asp and the
sp_makewebtask solution although this is really only suitable for smaller
files.
John
"shank" <shank@.tampabay.rr.com> wrote in message
news:uupZSE$DGHA.3000@.TK2MSFTNGP14.phx.gbl...
> I'm on a shared server with no DTS capabilities. Is it possible to use a
> stored procedure to export data from an SQL recordset into an XML file on
> a remote server? i.e. I would need to create http://mydomain/myfile.xml
> Anyone have sample code?
> thanks
>
No comments:
Post a Comment