Home » RDBMS Server » Enterprise Manager » Entering variables into Sqlworksheet in Enterprise Manager
Entering variables into Sqlworksheet in Enterprise Manager [message #243516] Thu, 07 June 2007 10:42 Go to next message
lawlade
Messages: 59
Registered: May 2007
Location: LAUREL, MARYLAND
Member
I am trying to run Plsql script in sqlworksheet that prompt for values of several variables. I don't want to hard code these variables in the script. Is there a way one can do this from sqlworksheet?

Someone please help!
Re: Entering variables into SQL Worksheet in Enterprise Manager [message #243639 is a reply to message #243516] Fri, 08 June 2007 02:57 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
See Help -> Contents -> SQL*Plus -> Differences Between SQL*Plus Worksheet and SQLPlus Line Mode:

"If there are any prompt characters "&" in a script, SQL*Plus treats it as a "define" prompt."

So, you will have to DEFINE your variables before executing the script. Examples:

DEFINE tab=dual
SELECT * FROM &tab;


or

DEFINE tab=dual
@selfrom
Previous Topic: Rest Time Zone
Next Topic: Changing the IP address of Grid Server
Goto Forum:
  


Current Time: Fri Mar 29 10:17:08 CDT 2024