Can I use a named pipe to bcp/dump data out or in in Sybase?

Submitted by: Administrator
System 10 and above.
If you would like to bcp copy from one table to a named pipe and compress:
1. %mknod bcp.pipe p
2. %compress sysobjects.Z &
3. %bcp master..sysobjects out bcp.pipe -c -U .. > bcp.pipe
4. Use ps(1) to determine when the compress finishes.

To bcp from my1db..dummy_table_1 to my2db..dummy_table_2:

1. %mknod bcp.pipe p
2. %bcp my2db..dummy_table_2 in bcp.pipe -c -U .. &

To avoid confusion between the above bcp and the next, you may choose to either use a separate window or redirect the output to a file.

3. %bcp my1db..dummy_table_1 out bcp.pipe -c -U
Submitted by: Administrator

Read Online Sybase Job Interview Questions And Answers