Home » Infrastructure » Unix » sql at % prompt
sql at % prompt [message #97767] Mon, 13 January 2003 09:16 Go to next message
Larry
Messages: 11
Registered: September 2002
Junior Member
Is there a way to write an sql query at a % prompt? The only way I know how is to go into isql.

L
Re: sql at % prompt [message #97788 is a reply to message #97767] Thu, 23 January 2003 15:59 Go to previous message
Jay
Messages: 127
Registered: October 1999
Senior Member
You have to make an aliases.rc file.

It should look like this

alias alter "echo 'alter !:*;' | $INFORMIXDIR/bin/isql $DB"
alias create "echo 'create !:*;' | $INFORMIXDIR/bin/isql $DB"
alias delete "echo 'delete !:*;' | $INFORMIXDIR/bin/isql $DB"
alias drop "echo 'drop !:*;' | $INFORMIXDIR/bin/isql $DB"
alias grant "echo 'grant !:*;' | $INFORMIXDIR/bin/isql $DB"
alias insert "echo 'insert !:*;' | $INFORMIXDIR/bin/isql $DB"
alias rename "echo 'rename !:*;' | $INFORMIXDIR/bin/isql $DB"
alias revoke "echo 'revoke !:*;' | $INFORMIXDIR/bin/isql $DB"
alias select "echo 'select !:*;' | $INFORMIXDIR/bin/isql $DB"
alias update "echo 'update !:*;' | $INFORMIXDIR/bin/isql $DB"
alias info "echo 'info !:*;' | $INFORMIXDIR/bin/isql $DB"

Then at a prompt type
$INFORMIXDIR/bin/isql $DB << EOF (the $DB is the name of your database).

Then after your sql type EOF to end.
Previous Topic: pass parameter from oracle to unix......
Next Topic: Please Help! Oracle not available after fresh installation
Goto Forum:
  


Current Time: Fri Nov 29 16:06:17 CST 2024