http://goo.gl/EmKxy0

Home > ASE, Developement, Start Sybase, Sybase ASE/REP Interview Questions, UNIX > How to run sybase query in different databases in one run

How to run sybase query in different databases in one run

I would suggest to run SQL via shell script as below.

database.txt

————

database1

database2

database3

 

query.txt

———

select col1, col2 from table

go

write shell script

multiple_database_query.sh

————————–

while read LINE

do

database=$LINE

isql -S “” -D “${database}” -i “query.txt”

done < database.txt

 

Check the Sybase Wiki @ sybasewiki.com
  1. No comments yet.
  1. No trackbacks yet.