MYSYSAD.COM

Using UNIX Redirection Symbols for Sybase

· Databases · Shell & text

You can send input to the isql command via the command line interface. Note the ESOFT string is arbitrary. I have also included reading SQL commands from a file. Here are the examples.

# isql -Usa -Pyourpassword -Syourserver_name << ESOFT > myoutput
use esoftdb
go
select count(*) from mysoft_table
go
ESOFT

View the results
# cat myoutput

Read SQL from a file
# isql -Usa -Pyourpassword -Syourserver_name < ESOFTFILE > myoutput

View the results
# cat myoutput