November 4, 2005 at 8:35 am
I have this provedure that it long so i have pasted the first and last part of the procedure.
Alter PROCEDURE outputexport
@key varchar(20) = null
,@export int = 1
AS
BEGIN
CREATE TABLE test
/*Create the table for data*/
.
.
.
SELECT * FROM test
if @export = 1
begin
exec filetransferto 1, '"G:/export"', 'output', 'txt', 1, 0, @TableName='test'
exec filetransferto 1, '"G:/export"', 'output', 'txt', 1, 0, @TableName='test'
end
else select * from test
drop table #QRMDump
END
GO
I am trying to put this in such as that i can run from different server but the file will go to the same location that shown in('"G:/export"')
I am trying to declare @cmd that will do this
declare @cmd varchar(128)
set @cmd = (select @@ServerName) + '"G:/export"'
and calling the
exec filetransferto 1, @cmd, 'output', 'txt', 1, 0, @TableName='test'
but it give invalid file path error.
hope someone can give me answer!!
thanks
November 4, 2005 at 9:03 am
Do all the servers have access to that drive?
Do all the server have permission to write to that directory AND overwrite the file if needed?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply