SQL-ftpd GET command


Note: Your ftp client may be case sensitive

The GET command is used to get data from a SQL server table or view, or execute a stored procedure on the remote SQL server. Since this is the basic functionality of the SQL-ftpd server, it deserves a little more than a brief overview.

With a standard ftp session, you would issue a get command to transfer a file from the remote file system to the local file system. You can specify a filename for the remote file, or if you leave it blank it will use the filename from the remote file system. However, under SQL-ftpd, this command is being mapped to a SQL server database and hence requires a few operating changes. A synopsis of those changes is given below:

A synopsis of the command is given below:

This will execute <sql-statement> on the SQL server, and return the results into the file named <local-file> on your local system.

Different systems use different variations on this command. The IBM mainframe, for example, requires that you encapsulate your sql-statement inside of single quotes (') instead of double quotes ("). Other systems may have other differences.

An example of this command's usage is given below:

In the preceeding example, the sql-statement select * from view_name is executed on the remote SQL server, returning the results into the local file sql.txt.

If you're query requires quoted information as part of the select statement, you simply reverse the option of single quotes versus double quotes. For example, if you encapsulate the sql-statement in double quotes, encapsulate your quoted data in single quotes, contained within the double quoted sql-statement.

Note that on some systems, you may have to allocate space for the local file or dataset, before issuing the get command.

If you wish to retrieve the data without delimiters, you may change this behaviour by using the site command to toggle the tabs delimiter. Your choices are to have tabs as delimiters or have no delimiters at all.

You should also consult the Data Output Format pages for information on how the result data will be formatted (according to the column type).


Forward to the put command manual page.
Return to the SQL-ftpd Commands Page