mruff
asked on
Execute Oracle Query via unix shell sql plus, query is in file
Hello experts
I want to execute a sql query from a shell script. I have the commands in my .sh script:
sqlplus user/pw@db
connnect user/ow@db
spool myres
->This all works well, now I want to execute a sql command which is in a file:
@myquery.sql
->I get SP2-0734: unknown command beginning "@myquery ..." rest of the line ignored
How can I in my script exectute a SQL query which is in a file?
I want to execute a sql query from a shell script. I have the commands in my .sh script:
sqlplus user/pw@db
connnect user/ow@db
spool myres
->This all works well, now I want to execute a sql command which is in a file:
@myquery.sql
->I get SP2-0734: unknown command beginning "@myquery ..." rest of the line ignored
How can I in my script exectute a SQL query which is in a file?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.