I have done this in the past using xp_cmdshell.
put simply.....
create procedure export_ftp_results
as
/* pre process the data into the output format - real table not a #tmp table
may be better*/
select output data into #tmp_table
where ......
xp_cmdshell('bcp output.txt out #tmp_table etc...)
xp_cmdshell('ftpexport.bat')
end
where ftpexport.cmd is a batch file that will call ftp with the right login
parameters etc.
likewise for import, ftp the data back then bcp in to a table and then do
any post data processing.
Regards
Chris Gadsby
"T.S.Negi" <ti********@mind-infotech.com> wrote in message
news:a1**************************@posting.google.c om...
Hi All,
I have to write a stored procedure which will send/Receive text file
from/to a server by using FTP.
Is anybody have done anything on it? or know about it.
If yes, I would like to know about it. (also provide the stored
procedure code if possible)
Thanks in Adv.
T.S.Negi