Transact-SQL commands cannot transfer data in bulk. For this reason, use bcp for any large transfers.
Importing data that was previously associated with another program, such as the records from another database management system. This is the most common use for bcp.
Put the data to transfer into an operating system file.
Run bcp from the operating system command line.
Moving tables between SAP ASE servers or between an SAP ASE server and other data sources that can produce an operating-system file.
Copying out data from a view.
Use bcp to move the data from the SAP ASE server into an operating-system file from which the other program imports the data.
When you finish using your data with the other program, copy it into an operating-system file, then use bcp to copy it into the SAP ASE server.
The SAP ASE server can accept data in any character or binary format, as long as the data file describes either the length of the fields or the terminators, the characters that separate columns.
Imports from a file, it appends data to an existing database table.
Exports to a file, it overwrites the previous contents of the file.
When the transfer is complete, bcp informs you of the:
Number of rows of data successfully copied
Number of rows (if any) that it could not copy
Total time the copy took
Average amount of time, in milliseconds, that it took to copy one row
Number of rows copied per second.
If bcp runs successfully, you see a return status of 0. The return status generally reflects errors from the operating system level and correspond to the ones listed in the errno.h file in the /usr/include/sys/ directory.