Perform SQL query then FTP

Hi All,

Would like to ask if its possible to perform sql query in another machine and then the output will be sent back to local via ftp.

Machine1 - home server
Machine2 - 2nd server

Scenario: will perform sql query in Machine2 then put it into temp table then the temp table will be extract and ftp it into home server.
Please advise,

Thanks,

Hi,
it is possible, but usually a simpler way is used. Most database systems (in fact I do not know of any that does not) offer clients to query remote databases and spool the result to a local file.

Yes sir but the problem is i need to automate it in unix. the extraction of data is automated.

Thanks,