Why PL/SQL procedures does not allow users to enter data dynamically at run time?
Dear all,
I tried to do a procedure that will search for a group of approval in our database that matches.
(1) the number of levels
(2) the number of users by each level
(3) the id of users by level
entered by the user.
I tried various methods to receive user input dynamically at run time, but in vain.
Finally finished my procedure allowing the user to enter the parameters and then executes the procedure, to which these parameters are passed as arguments. (1 variable for the number of levels and 2 userdefinedarrays with the number of users by level and level respectively)
Why PL/SQL procedures does not allow users to enter data dynamically at run time?
Thanks in advance,
Séverine Suresh
HEY, Sebastian,
3035408 wrote:
Hello Sir,
My question is that if I'm going to say, the number of levels 5, is there any way by which, at runtime, the procedure prompts me to enter at the start of the number of users per level. Now as soon as I get the number of users per level can I do the procedure ask me to enter the nicknames of the members of each level. I mean, something like a invite.
Thank you
Séverine Suresh
There is no way to do it in SQL or PL/SQL, because not SQL PL/SQL is a way to get user input. User interaction is a job for your front end, like Zlatko tool suggested in response to #5. If your front end tool is SQL * Plus, you can use the substtitution variables, as Jarkko showed in response #6.
Tags: Database
Similar Questions
-
When the sale related to enter the password 1234 for my Garmin Nuvi, Blackberry keyboard goes dead. It will not accept what I am trying to enter.
Any idea?
If you restart the device, the keyboard will still dead?
With the BlackBerry device powered time, remove battery for a few seconds and then reinsert the battery to restart.
-
iPhone 6 s - photo app does not allow users to take pictures and listen to music at the same time
The repro steps:
- iPhone 6 s - photo app does not allow the user to take pictures and listen to music at the same time
Music app vs photo app
(1) play a sound track in the music app
(2) the swtich to app photo (on the "Photo" mode)
(3) music stopsPandora app vs photo app
1) turn on pandora
2) switch to the camera on the 6s iphone app
(3) stopping the musicPLEASE FIX AS SOON AS POSSIBLE *.
My iPhone stopped playing music when you take photos?
Nothing to trouble since he was not taken in charge.
- iPhone 6 s - photo app does not allow the user to take pictures and listen to music at the same time
-
Why Magic Trackpad 2 does not allow me to drag-and - drop
I bought a Magic Trackpad 2
and it does not allow me to drag and drop the most basic functions
Why?
Click the icon, not the file name, and do not press too hard.
-
Microsoft Remote Desktop does not allow users to log on simultaneously
Original title: problem with Microsoft Remote Desktop not allowing users to log on simultaneously
I am currently using a MAc to connect to a desktop running windows 7. Recently, when I try to access the computer with Microsoft Remote Desktop it will launch all users on the computer. He was not used to do this, does anyone have an idea what could have caused this and how to fix it?
Hi Bert,.
Thanks for posting your query in Microsoft Community Forum.
The question you posted would be better suited in the TechNet Forums. However, we can refer to the articles below and check if the problem still persists.
Configure the remote desktop on Windows 7 systems
Connect to another computer using Remote Desktop connection
If the problem persists, I recommend posting your query in the TechNet Forums for the best support.
Hope this information is useful. Do not hesitate to write to us in case you have any problems/concerns while working on your computer, we will be happy to help you.
Thank you.
-
my address bar does not allow me to enter information, how to access?
before that I could go directly to the address bar. Now he has a magnifying glass at the beginning of the bar and does not allow me to type in it. What should I do to be able to search in the bar of monzilla?
Sometimes a problem with Firefox can be a result of malware installed on your computer, you may not be aware of.
You can try these free programs to search for malicious software that work with your existing anti-virus software:
- Microsoft safety scanner
- MalwareBytes' Anti-Malware
- TDSSKiller - AntiRootkit utility
- Hitman Pro
- ESET Online Scanner
Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP, if you do not already have one.
More information can be found in the article troubleshooting Firefox problems caused by malware .
This solve your problems? Please report to us!
_______________________________________________________________________________Hello
The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
Note: This will make you lose all the Extensions, open Web sites and preferences.To reset Firefox, perform the following steps:
- Go to Firefox > help > troubleshooting information.
- Click on the button 'Reset Firefox'.
- Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
- Firefox opens with all the default settings applied.
Information can be found in the article Firefox Refresh - reset the settings and Add-ons .
This solve your problems? Please report to us!
Thank you.
-
Firefox has a plugin that allows you to play. Stream AVI files in the browser.
There are of course more types of file stream only. AVI that vlc media player (a very popular program) can play.
Why doesn't firefox allow these types of streams, that is to say - FLV to play using the browser firefox via the plugin?
Firefox does not even allow users to manually set this behavior.
I think it's ridiculous to have the potential to be a great another browser, but not yet the chance to compete because of this inconceivable gap.I got an advance on the answer here:
http://www.ehow.com/how_5772216_select-browser-media-player.htmlThank you.
-
Why the Kill_session procedure does not work?
Hi all
I like to kill session grant the user of the app in the dev environment. So I did the following steps, but the procedure kills him the session while testing.
Step 1:
create or replace procedure kill_session
(
p_sid NUMBER,
p_serial # NUMBER
) AS
m_sql VARCHAR2 (1000);
m_loginusername VARCHAR2 (30);
m_killusername VARCHAR2 (30);
m_schemaname varchar2 (30);
BEGIN
SELECT a.USERNAME, a.SCHEMANAME INTO m_killusername, m_schemaname
SESSION $ v one
WHERE a.sid = p_sid
AND a.serial # = p_serial #;
Select the user in double m_loginusername;
IF m_loginusername = m_killusername AND m_schemaname NOT IN ('SYS', 'SYSTEM')
THEN
m_sql: =' the ALTER SYSTEM KILL SESSION ' | " ' || p_sid | «, » || p_serial # | '''|| "' IMMEDIATE ';
EXECUTE IMMEDIATE m_sql;
dbms_output.put_line ("'Session killed.");
ON THE OTHER
dbms_output.put_line (' User Login ' | m_loginusername |) "The user to Kill ' | m_killusername);
dbms_output.put_line ('can't kill session from other users or Admin users');
raise_application_error (-20101, ' can't kill the session to other users or Admin users, or self');
END IF;
EXCEPTION
WHILE OTHERS THEN
dbms_output.put_line ('Error in Session kill.' |) SQLERRM (SQLCODE));
END kill_session;
Step 2:
Grant execute on sys.kill_session to the APP.
Grant select on v_$ APP session;
Step 3:
To validate this permission to kill session, as a s/n, I created the TEST user and created a session. Then I tried to kill the TEST user's sid, but the procedure did not kill the session instead it gives power like PL/SQL executed successfully.
By
Mr.BSet serveroutput on
SQL> set serveroutput on SQL> exec sys.kill_session(132,10); Session Killed. PL/SQL procedure successfully completed. {code
-
I just need help man.
The original owner may change his password here: Apple - my Apple ID.
These are the measures that must be taken to remove its ID to find my iPhone if it does not want to provide you with password:
Turn off find my iPhone Activation Lock - Apple Support
Good luck
GB
-
Hello. I have a problem you're trying to start my program I wrote long ago on VB6. When it is run, it displays an error message: "run-time error '339': component ' COMCTL32." "OCX' is not correctly registered: a file is missing or invalid. I searched "comctl32.ocx", but it doesn't seem to be anywhere in C:\Windows (including subfolders). Using this installation - first http://www.microsoft.com/en-us/download/details.aspx?id=10019 , then System File Checker do not solve the problem - the program still does not work and ' COMCTL32. OCX' is not found. What should I do?
Start here: http://msdn.microsoft.com/en-us/vstudio/ms788708
This link to the download for the execution time extended to http://support.microsoft.com/kb/957924
and
http://www.Microsoft.com/en-US/Download/details.aspx?ID=7030
-
SQL procedure does not work with 'current cursor' Oracle 11 g
Hi all
I've written a procedure that should update all rows for a single column on a given table.
Here is the code:
CREATE OR REPLACE PROCEDURE "xxx". "" loop_update_autowert_x ".
(
number of startwert
column_name VARCHAR2,
table_name varchar2
)
AS
stmt varchar2 (2000);
stmt2 varchar2 (2000);
number of zaehler;
number of sum_gesamt;
TYPE obj_ref_type IS REF CURSOR;
obj_cur obj_ref_type;
Start
stmt2: = ' select rownum, rowid of | table_name | "for update";
Obj_cur OPEN FOR stmt2;
dbms_output. Enable (1000000);
dbms_output.put_line (' ist Startwert: ' | startwert);
dbms_output.put_line (' ist column name: ' | column_name);
dbms_output.put_line (' ist Table name: ' | table_name);
loop
extract the obj_cur in zaehler, my_rowid;
exit WHEN obj_cur % NOTFOUND;
sum_gesamt: = zaehler + startwert;
stmt: = "update". table_name | 'set ' | column_name | ' = ' || sum_gesamt | "WHERE the current of obj_cur";
dbms_output.put_line (stmt);
immediately execute stmt;
end loop;
close obj_cur;
end;
the error I get is:
Anmeldung bei der data base Oracle Test2.
ORA-03001: Funktion nicht solution
ORA-06512: in "xxx.loop_update_autowert_x", line 29
ORA-06512: In line 10
Startwert ist: 5
Column name ist: one
Table Name is: T
Update T set a = 6 WHERE the currents of obj_cur
Process finished.
Abmeldung von der data base Oracle Test2.
have anyone an idea what is wrong or this construction with the clause "cursor open for the statement" is not possible with the current cursor location
thx for help
Best regards
Hans-PeterWhen informed of the cursor works with static cursors and static sql only.
----------
Sybrand Bakker
Senior Oracle DBA -
PL/SQL procedure does not compile
Hello guys! I worked on a procedure these days, and even if the result looks good to me, I can not compile the proc error ORA-00933.
Can you please have a look at - 4 eyes can detect more than two ;-)
Thank you very much! I appreciate your help and your advice!
ARO
SEB
Edited by: skahlert the 06.04.2010 07:57create or replace PROCEDURE "PR_FANGZAHLEN_TW_SK" (PR_falle NUMBER, PR_fallennummer NUMBER, PR_schaedling NUMBER) IS datum_letzter_datensatz DATE; diff_datum NUMBER (10); tagesfang NUMBER (12); y NUMBER (10); BEGIN /*Date of first record*/ select min(f.date_datum) into datum_letzter_datensatz from borki.fangzahlen f where f.lng_falle = PR_falle and f.int_fallennummer = PR_fallennummer and f.lng_schaedling = PR_schaedling; IF EXISTS (select * FROM borki.fangzahlen f WHERE f.lng_falle = PR_falle AND f.int_fallennummer = PR_fallennummer AND (f.lng_schaedling = PR_schaedling) AND ((f.date_datum - datum_letzter_datensatz) > 0) AND ((f.int_anzahl > 0) or (f.int_volumen > 0)) ) THEN select (case when f.int_volumen > 0 and f.lng_schaedling = 1 then f.int_volumen * 40 when f.int_volumen > 0 and f.lng_schaedling = 2 then f.int_volumen * 550 when f.int_anzahl > 0 then f.int_anzahl end) / (f.date_datum - datum_letzter_datensatz) into tagesfang from fangzahlen f where (f.lng_falle = pr_falle) and (f.int_fallennummer = pr_fallennummer) and (f.lng_schaedling = pr_schaedling) and ((f.date_datum - datum_letzter_datensatz) > 0) and ((f.int_anzahl > 0) or (f.int_volumen > 0)) y := 1; WHILE y < diff_datum + 1 LOOP /* Insert FANGZAHLEN_TAGESWERTE*/ INSERT INTO fangzahlen_tageswerte (objectid, lng_falle, date_datum, int_fallennummer, lng_schaedling, int_volumen, int_anzahl, lng_fangzahlen ) SELECT seq_fangzahlen_tageswerte.NEXTVAL, f.lng_falle, datum_letzter_datensatz + y, f.int_fallennummer, f.lng_schaedling, f.int_volumen, tagesfang, f.objectid from fangzahlen f where f.lng_falle = PR_falle and f.int_fallennummer = PR_fallennummer and f.lng_schaedling = PR_schaedling and (f.date_datum - datum_letzter_datensatz) > 0 and (f.int_anzahl > 0) or (f.int_volumen > 0) y := y + 1; END LOOP; END IF; EXCEPTION WHEN NO_DATA_FOUND THEN NULL; WHEN OTHERS THEN -- Consider logging the error and then re-raise RAISE; END "PR_FANGZAHLEN_TW_SK";
It's your EXISTS, you cannot use this way. You will need to use a different SELECT INTO (you can add AND ROWNUM = 1) or a CASE statement. Looks like you are testing the existence of certain data and depending on whether you want to process the data.
It reminds me of this: http://tkyte.blogspot.com/2008/12/doing-it-wrong.html
You might consider restructuring your code. (Less code is less bugs =) -
Does anyone know why my laptop computer does not allow me on some sites?
I understand that a lot of people have asked this, but nothing seems to help. I changed browsers, I looked for answers, but he won't. I think that my laptop has a virus.
I can't go on Youtube or Tumblr Wattpad. Now, those who are not very important, but she also doesn't let me get on Google Docs, which is a problem because it's where I put all my important work. Someone please help!
I have an Asus laptop with Windows 8, if it's any use. I'd appreciate any help!
Hi Lillian,
Thanks for the reply.
Are you facing this problem on Internet Explorer?
Method 1:
If this isn't the case, I suggest you contact Google Chrome support for assistance.
https://support.Google.com/chrome
Method 2:
If the problem also occurs on Internet Explorer, try the steps suggested in the previous post and check if it helps.
Method 3:
In addition, you can run Microsoft Safety Scanner to ensure that there is no virus. Check if it helps.
The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.
http://www.Microsoft.com/security/scanner/en-us/default.aspxNote:
(1) the Microsoft Safety Scanner expires 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.
2) if you run the virus scan of the program which is infected with the virus will be deleted. Therefore, reinstall the program. Also, if files and folders are affected by the virus, while they might even get deleted.Hope this information helps. Reply to the post with an up-to-date report of the issue so that we can help you further.
-
Remote Desktop Windows 7 does not allow me to enter a field
I have a win xp and a host of windows 7 PC, they are not on any field.
I have a VPN access in the work.
When I start remote desktop on the XP PC I find myself with a login screen to the remote computer where I can type in my work to logon, the password and the domain.
On the (new) windows 7 PC, I don't get anything that will allow me to type in the field.
I start with the credentials of my home PC and it has a "change user", but that gets me only to one PC House accounts.
I looked in the options and tried a few things, but no joy. There is no gateway Office remotely. I'm in the VPN and can access things like proves it the XP box.
I can start vmware and run an XP box on it and that gets me in, but it's so backward...
What should I change in win7 or remote desktop to get this working?
Thank you
Martina
Never mind.
It's a bit stupid, but if I type in domain\logon as a login and password to work it actually works.
sigh
Martina
-
Configuration for Laserjet 1102w HTML page does not allow me to enter NETWORK tab
try to install Laserjet 1102W, but can not enter the NETWORK tab on the HTML th Configurator. Simply does nothing.
Only part that meets in the Configurator is the left side panel for more INFORMATION. Help!
It can also be useful (especially step 4) if you use Mac... http://support.HP.com/us-en/document/c02020336
Good luck
Lagunak
I work for HP but my messages and responses are mine.
Maybe you are looking for
-
My most old XP Desktop, is there an upgrade after SP3 for it? I currently have SP3. My title has been placed by mistake > Arthur H
-
Title explains my problem
-
Hello! I have a NAS200 (2 x 1 TB HDD) set up by the other guy in stripping Raid (raid 0) It's the folder structure (with read/write access ) public folders size disc is the same with the size of public folders I don't know if one of these folders (pu
-
How to create an Association in my default to allow sending emails,
I have an e-mail program that I have used for many years, but when I right click on a picture to send it to the recipient's eMail, I get the message that there is no email associated program Please create an association in the Panel by default.
-
I wanted to say that I just started to use the product, and I love it. It covers a lot of ground pretty well. I had a few problems that have been bugging me.When selecting between tables (in the relational model), it keeps popping up new properties