Sybase Question:
Download Questions PDF

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

Answer:

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.)

Download Sybase Interview Questions And Answers PDF

Previous QuestionNext Question
How do I make isql secure in Sybase?How do I bcp null dates in Sybase?