Of Interest
Be responsible for your future Enter the USA legally!
Visa, Green Card, Citizenship, Passport Consultation Services
|
Sybase
»
UNIX
»
Commands
»
BCP data to/from a flat file
/* export */
/apps/sybase/bin/bcp dbname..tablename out /data/data01.bcp -c -Ujsmith -Pyankees -Sserver -I/apps/sybase/interfaces
/* import */
/apps/sybase/bin/bcp dbname..tablename in /data/data01.bcp -c -Ujsmith -Pyankees -Sserver -I/apps/sybase/interfaces
/* BCP table "employee" to file named test1.txt */
/apps/sybase/bin/bcp dev_db..employee out test1.txt -c -t \\t -r \\n
-Sserver -Ujsmith -I/apps/sybase/interfaces
/* BCP file named test2.txt into table employee */
/apps/sybase/bin/bcp dev_db..employee in test2.txt -c -t \\t -r \\n
-Sserver -Ujsmith -I/apps/sybase/interfaces
Parms for each command:
database
table
in/out
character format specified (-c)
tab is the field separator (-t \\t)
newline is the record separator (-r \\n)
server
user
interfaces
|
|
|
Get the latest Rocket99 news and tech tips via
|