Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help! how to run a script in isql?

Status
Not open for further replies.

LucieLastic

Programmer
May 9, 2001
1,694
GB
hi

Could someone tell me the command for running a script in isql? I have the script as a .txt file but once in isql, I don't know what the command is. Need help.

thanks for help
lou
 
isql -Uusername -Ppassword < scrfile.txt

HTH ;-) Dickie Bird
db@dickiebird.freeserve.co.uk
 
Thanks DickieBird.

I have found a similar eg on t'internet like this

isql -Ublah -Pblah -Sblah -i<scriptname>

What's the -i for? and is your < a typo thingy?

big ta
lou
 
hello,

here you go:

isql -Usa -P{password} -i a.txt -o a.out

hth,
q.

 
They're synonymous !
isql -Uusername -Ppassword < scrfile.txt > outfile.txt
is same as isql -Uusername -Ppassword -i scrfile.txt -o outfile.txt
< and > are redirection symbols in unix
so we are running isql with 2 parameters (user and password)
using info. from scrfile.txt ( which must have command terminator (eg 'go') after each instruction ) and then any output is sent to outfile.txt.
Easy ( when you know how/why! )
;-)



Dickie Bird
db@dickiebird.freeserve.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top