DBA > Job Interview Questions > Sybase Interview Questions and Answers

How do I pipe the output of isql to a file in Sy

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

How do I pipe the output of isql to a file in Sybase?

Fortunately this is one of the simple ones. For batch sessions, simply use the the -o command line switch to specify the name of the output file. For interactive sessions, the simplest method is turn on the capture functionality of your xterm window while running the query. If this isn't possible (i.e., you are not running on UNIX), then there are a couple of options:

* Use sqsh instead
* Use the tee(1) command which takes the output from a command and writes/appends it to a file, as well as displaying it on the screen. (Again, this may be UNIX-specific; Windows users should research the CYGWIN toolset for similar functionality.)

(Continued on next question...)

Other Job Interview Questions