Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on taking inputs at run time within the SQL forums, part of the Databases category; hi... i want to write a procedure which can take inputs from user at runtime (not at compile time). "&" didnt work. please tell me syntax for the same......
|
|||||||
|
|||
|
taking inputs at run time
hi...
i want to write a procedure which can take inputs from user at runtime (not at compile time). "&" didnt work. please tell me syntax for the same... |
| Sponsored Links |
|
|||
|
Re: taking inputs at run time
Satyajith,
The accept command can be used to prompt for a value for a substitution variable. When no prompt is supplied it will display a message to enter a value for variable. If the variable already exists the old value will be shown so the user can change it. Syntax: ACCEPT variable [PROMPT text ]; Eg: Display a message to enter an employee number before getting the data for that employee: ACCEPT myempno PROMPT 'Enter an employee number'; select * from emp where empno = &myempno; OR Display a message to enter a department number before getting the department data. The value for department should be preset to 20, the user can change it at the prompt: DEFINE mydeptno = 20; ACCEPT mydeptno PROMPT 'Enter the department number'; select * from dept where deptno = &mydeptno; Thanks & Regards, Riju. |
|
|||
|
Re: taking inputs at run time
u can pass parameter before executing sql qry.
In procedure,we can not pass inputs in middle of the procedure process. but at time of execution ,we can pass parameters to procedure (only when the procedure is Parameterized)
__________________
Sireesha |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can I pass inputs to job through JCL | Geek_Guest | MainFrame | 3 | 02-26-2008 06:37 AM |
| Get out put without taking argument | aarruunnaa | C# | 1 | 12-29-2007 01:29 AM |
| How to automate user inputs... | psuresh1982 | Java | 1 | 08-18-2007 05:38 AM |
| Regarding Inputs | Namedm | C# | 2 | 06-11-2007 04:57 AM |
| Taking much time to open form in project instance.. | JobHelper | Oracle Apps | 0 | 02-08-2007 02:43 PM |