SQL-ftpd Output Data Formats


Since the SQL-ftpd server has to format the data in a format which can be read by the masses, it needs to be formatted into something standard and something based in text. This alleviates the problems of integer/real formatting across different platforms and provides a standard by which all programs using SQL-ftpd returned data can accomodate.

The data formats for various datatypes are as follows:

SQL Server Column Datatype Printed (Data) Format Length and type
bit (1 byte) 1 character
char (x bytes) x characters (returns exact column width)
datetime 26 characters
float (4 or 8 bytes) 20 characters
int (4 bytes) 11 characters
money (2 or 4 bytes) 24 characters
smalldatetime 26 characters
smallint (2 bytes) 6 characters
tinyint (1 byte) 3 characters
varchar (x bytes) x characters (returns exact column width)

These formats are consistent with the Sybase SQL-server (4.9.x) standards for printed column lengths and are defined in the Transact SQL-Server User's Guide.

Should you wish to modify these formats, you can do so within your SQL code used to retrieve data for the get command. Using such constructs as rtrim(...), ltrim(...), and substr(...) you can tailor the output of your SQL statement when performing a get operation. For more information consult the Transact SQL User's Guide or the SybBooks product.


Next Step: See more examples of usage
Return to the SQL-ftpd Page