Procedure and settings

Could someone post an example or a link on how to call a procedure and to pass a procedure, and how the procedure receives this settings?

Thanks in advance

Demos IN, OUT and ON the use of the parameter found in the demos in the Morgan Library in www.psoug.org. Search for STORED PROCEDURES.

Tags: Database

Similar Questions

  • Procedure 'IN' settings and in NUMBER of loop dbms_output

    I have this procedure which takes two values, a name and a number, as parameters. I do things with them, then try of the output result.

    The code will run well and produce the correct result without printing through DBMS with the loop FOR (I RUN the procedure and manually doing a SELECT on the view and the values are correct). Then I deleted a word in the code, spruced up the same word in the same place in the code, and suddenly I had a different and incorrect result. After you delete and retype everything code for fear of a ghost or something character, it ran fine again without the DBMS FOR part print loop. I typed in the loop FOR and now it does not yet work with errors on the assignment of variable "temp" and "temp1". It worked fine before the additional code has been added. It makes no sense to me.

    I use Oracle SQL Developer.

    The code runs and the results I want, but I keep running in what appears to have problems with the development software. IIF someone could look at the code and help I would really appreciate it. I spent many, many hours on this...

    CODE:

    PROCEDURE GetThem (nameIn IN varchar2, percIn IN number) AS

    Temp varchar2 (30): = '& nameIn'; -SOMETIMES GETTING ERRORS OF TYPE HERE INCORRECT ATTRIBUTION, SOMETIMES NOT...
    number of Temp1: = '& percIn'; -HERE TOO, SAME AS ABOVE

    BEGIN


    EXECUTE IMMEDIATE ' VIEW to CREATE or REPLACE personTotal AS
    SELECT person, COUNT (name) AS total FROM (SELECT DISTINCT name, comments FROM person person WHERE! = temp) GROUP BY person ';

    EXECUTE IMMEDIATE ' VIEW to CREATE or REPLACE sharedTotal AS
    SELECT p.person, COUNT (DISTINCT name) AS best of observations p WHERE p.person! = temp AND p.name IN (SELECT DISTINCT observations g WHERE g.person = temp g.name) GROUP BY p.person';

    FOR tt IN (SELECT p.person FROM personTotal p, sharedTotal s p.person WHERE = temp1 AND s.person < = s.bhave/p.total ORDER BY person)

    LOOP

    dbms_output.put_line (' ' | tt.person |) ' ' ); -SHOULD GENERATE SOME RESULTS HERE BUT UNTESTED

    END LOOP;

    END GetThem;

    Hi, Ben.

    Aymen says:
    Frank,

    Thank you once again. I have looked at the code and I'm testing it in a procedure.

    I do not ask more of you, but I'm going to...

    I'm a student in computer engineering and a data base of the course.

    Then do not use the query I posted earlier. Your teacher will give you more credit to submit your own work, instead of copying someone else, no matter how elegant which can be. An approach as you suggested above will be fine for this mission.

    It is an assignment that I worked on 4 days with what is the last problem. I was not aware of the existence of procedures util, I've seen this problem in my mission.

    I have been searching on the internet and got lots of information on procedures, but they are general examples and I don't understand how they apply to my case.

    There was therefore no preparatory work on the procedures in your class? I find it quite cruel.

    I still have a problem with the part of the output and also, I get an error when I place the SELECT statement in the procedure. (Error (8.7): PLS-00428: an INTO clause in this SELECT statement) It seems that he wants me to put the result in a variable.

    When you run a query in SQL * more (or most any front-end) you're doing 2 things:
    (1) obtain data tables in the database in a result set, and
    (2) display that game results
    SQL * more autiomatically makes two things together, so you often do not even consider them as separate steps. In PL/SQL, explicitly do you somehting for each step separately.

    Here's what I found:

    -Use an output variable, declare it before calling the procedure and put it in the settings and then assign it the value to be returned in the variable.

    That's right, but it's the only way to make a query in PL/SQL.
    Another way, better for this assignment, is to use a cursor loop, as you did in your first post.

    Consider this problem: write a procedure which, for a specific job in the table scott.emp, considers people who have this work and who has wages are at least as high as the average salary for this job in their own departments (counting their own salaries).
    Here is information on all the people with job = 'CLERK ":

    `   DEPTNO ENAME             SAL JOB
    ---------- ---------- ---------- ---------
            10 MILLER           1300 CLERK
            20 SMITH             800 CLERK
            20 ADAMS            1100 CLERK
            30 JAMES             950 CLERK
    

    In the 10 departments, there as a CLERK, namely MILLER. The sal average clerks in 10 1300 dept, sal MILLER is equal to that, if MILLER should be included in the output.
    Dept = 30 is another trivial case, like dept = 10.
    Dept = 20 is more interesting. The average sal for clerks in dept 20 is (800 + 1100) / 2 = 950. Sal of SMITH is less than 950, SMITH should not be in the output. Sal of ADAMS is above 950, ADAMS should be in the output.

    Here's a way to write a procedure that gets these results:

    CREATE OR REPLACE PROCEDURE     avg_or_above
    (       in_job       VARCHAR2
    )
    AS
    BEGIN
         FOR  this_emp  IN (
                                     WITH     avg_by_dept     AS
                         (
                                 SELECT    deptno
                              ,             AVG (sal)     AS avg_sal
                              FROM      scott.emp
                              WHERE     job     = in_job
                              GROUP BY     deptno
                         )
                         SELECT  e.ename
                         ,           e.sal
                         FROM    scott.emp        e
                         JOIN    avg_by_dept  a  ON  e.deptno  = a.deptno
                         WHERE   e.sal     >= a.avg_sal
                         AND     e.job     = in_job
                     )
         LOOP
              dbms_output.put_line (  RPAD (this_emp.ename, 12)
                             || TO_CHAR (this_emp.sal, '99999')
                             );
         END LOOP;
    END     avg_or_above;
    /
    SHOW ERROR
    

    In SQL * Plus, you can call the procedure as follows:

    SET     SERVEROUTPUT     ON
    
    EXEC  avg_or_above ('CLERK');
    

    and the output will look like this:

    ADAMS         1100
    JAMES          950
    MILLER        1300
    

    Here's how it works:

    FOR  x IN (q)
    LOOP
        ...     -- Code here is "inside" the loop
    END LOOP;
    

    runs a query q. Like any question, q can begin with the SELECT keyword or keyword WITH.
    For each row returned by the query q, the results of this line are placed in the variable x, which is a data structure created automatically to have an element for each column in the query. In this example, the query produces two columns (an ename called, which is a VARCHAR2, and the other called sal, which is a NUMBER), then x has two components: the x.ename (which is a VARCHAR2) and x.sal (which is a NUMBER). Inside the loop (i.e. after the LOOP but before the END LOOP statement) you can use x.ename any place where you can use a VARCHAR2 expression, and you can use x.sal everywhere where you can use a NUMBER. In this case, the body of the loop includes only one declaration, a call to dbms_output.put_line. However, you can have several statements between the instructions of LOOP and END_LOOP if you need to.

    It's everything you need to run a query and display its results in PL/SQL. There are other ways, but I think this one will do well enough for this mission.

    Note that there is no need of all views. The avg_by_dept of the subquery is like a point of view. In fact, by looking at only the main request in the cursor above:

    ...                     SELECT  e.ename
                         ,           e.sal
                         FROM    scott.emp        e
                         JOIN    avg_by_dept  a  ON  e.deptno  = a.deptno
                         WHERE   e.sal     >= a.avg_sal
                         AND     e.job     = in_job
    

    He has nothihng to indicate if the avg_by_dept is a table, a view, or a subquery, and it does not affect the query of some sort.

  • recover files from USM2T. UNC (old XP files and settings transfer tool) folder in windows 7

    Breath my old XP and put in place a new W7 Pro 64 b. stupid did me not carefully the manual before I went away to transfer all files and settings XP, the wizard files and Settings Transfer (FAST) "old."

    Now I'm stuck which dominates the stream _ with my nice, clean, but oh so empty, installation of Windows 7 Prof 64 b.

    Problem is that the wizard of Windows Easy Transfer (WET) native in W7, it will come out looking for a *.mig file - and guess what! There is no file in the USM2T source folder. UNC. Just a bunch of GOOD *. DAT files.

    Can someone give me a name on a good therapist or better yet, to guide me?

    Whatelse... ?  I found a GUI which is a wrapper for the MS-DOS command "fastconv" - but it's a bit unstable and it takes time awful lotta.

    Thanks in advance,

    Wolfbeach

    Hi wolfbeach ,

    Welcome to the Microsoft Answers community.

    I suggest you try the procedure described in step 2 of the link below.

    http://Windows.Microsoft.com/en-us/Windows7/help/upgrading-from-Windows-XP-to-Windows-7

    Hope this information is useful.

    Let me know if it worked.

    Thank you, and in what concerns:

    Umesh P - Microsoft Support

    Visit our http://social.answers.microsoft.com/Forums/en-US/answersfeedback/threads/ Microsoft answers feedback Forum and let us know what you think.

  • Deliver the profile of the user - My Documents folder moved to C:\Documents and Settings\TEMP. I can't view or access this folder to copy My Documents back. Help?

    XP Home SP3 on my laptop (no not in network - independent).

    After an Adobe Reader 10 X installed, there is a reboot, and when I logged in the profile that appeared was not mine - it was as if it was a new installation. I looked for my personal documents under My Documents and did not find them. So, I looked for them on the C: drive, found (no not noted where), and copied My Documents to what seemed like the name /my Documents /. After that, I could access my documents by clicking Start-My Documents online. I did another reboot. Now, after login, my old profile is displayed, and the My Documents folder is empty except for the value by default my pictures, my music, my videos, and favorite - and these are all basically empty.

    I then ran a program Search and Recover to find my documents - they were found under C:\Documents and Settings\TEMP\. Unfortunately, I can't seem to see that to explore (I have it configured to display the hidden files and folders). Is it possible to go to this folder and the moving my Documents back to my profile?

    Thank you

    Ananth

    Hello

    You can view these methods:

    Method 1:

    Check to see if the problem exists in Safe Mode, if the computer works as expected in mode without failure, then we can solve the problem in the clean boot state.
    a. refer to the article below for the procedure safe mode in Windows XP
    A description of the options to start in Windows XP Mode
    http://support.Microsoft.com/kb/315222

    b. it is a possibility that there is a startup program that is launched with a command line and it appears.
    You need to perform a clean boot to find the program that is causing and then disable or remove.
    How to configure Windows XP to start in a "clean boot" State
    http://support.Microsoft.com/kb/310353/en-us
    Note: When you are finished troubleshooting, follow the steps as explained in the article to reset the computer to start as usual.

    Method 2:

    System Restore takes a "snapshot" of critical system files and some program files and the registry settings and stores this information as restore points. If your computer is not working properly, you can use these points to return Windows XP to a previous state when your computer was working properly restore. It can also change scripts, batch files, and other types of executable files on your computer.

    How to restore Windows XP to a previous state

    http://support.Microsoft.com/kb/306084

    I hope this helps.

  • Several user under Documents and Settings profiles

    I have several machines to Windows XP Pro SP3 with several user profiles in the Documents and Settings folder.  My pc is one of them.  I have tvavra, tvavra. ASL, tvavra. ASL.000 and tvavra.ComputerName.  I understand that some of the accounts are created when mistakes happen, but I would like to have a procedure to clean the files.  Most often the reason why these folders are created first is when a user logs on the machine of someone else, they should draw these records.  I recently needed to redistribute machines in a campaign of savings and if I can eliminate clutter, I'd be very happy to help.

    The old profiles that are not currently in use are safe to remove. You can find your current profile by opening the folder my documents on the start menu and search in the address bar. You can check in each to make sure there are no files which are necessary for the first.

  • Peripheral Bluetooth disconnects when "Bluetooth Headset operations and settings" window is closed

    So when I connect my Bluetooth headset to my laptop I have at the same time press the 'connect' button on my headset * and * open the Bluetooth Headset operations and settings window, then click on 'Connect' on there also.

    So my first question is:

    Why do I have to do a step totally superfluous alone time I want to connect my headset? It should be the case that once I've set up my headset with my laptop, it will automatically connect when I press the 'connect' button on my helmet. I wouldn't do more than that.

    My second question is:

    Why my headphones does not cut off when I close the Bluetooth Headset operations and settings window?

    It's the same problem that this guy has been seen two years ago:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-hardware/Plantronics-M100-Bluetooth-headset-disconnects/a79abcf5-2f26-4240-A808-2d2042fe4e01

    Feature: Armel BSH10 Bluetooth stereo headset.

    Hello Teedjay,

    Thanks for posting your query on Microsoft Community forum.

    I would be grateful if you can provide us with the following information to help us better understand the issue.

    1. Going to Headset/Bluetooth Headset before working on this computer?
    2. Have you tried another Bluetooth device on this computer? Has been the result even?
    3. Have you tried the steps suggested in the thread you mentioned in your post? If yes what was the result and that do not try these measures after the method 1.

    Try the methods below and see if it works for you.

    Method 1:

    Run the hardware and devices troubleshooter.

    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter


    Method 2:

    If the problem persists, try to refer to the procedure described in the following Microsoft article and see if it helps.

     

    Add a Bluetooth device to your computer
    http://Windows.Microsoft.com/en-us/Windows7/add-a-Bluetooth-enabled-device-to-your-computer

     

    Connect to Bluetooth and other wireless or network devices
    http://Windows.Microsoft.com/en-us/Windows7/connect-to-Bluetooth-and-other-wireless-or-network-devices

    Hope it would help. If problem persists always post back with the current state of your computer and the result of the proposed suggestion, we will be happy to help you.

    Thank you.

  • I lost my documents and settings to windows 7 how folder to restore?

    I accidentally deleted my documents and settings folder in popular 7 How do I restore or take another?

    1. check that the Documents & settings is actually deleted, rather than simply hidden from view. Windows Explorer, Union, file & search options, view tab to view hidden folders and clear the Hide protected operating system files [a few lines below the item in the list of hidden folders].

    2 - made command prompt right click on the command prompt entry into all programs, accessories, and select run as administrator.

    3 - this procedure system restore returns the system files to the State they were at the time of the restore point was created.  But I have never seen a report of anyone removing the Documents & settings before folder so I don't know that the restoration would correct this particular problem.  This comment also applies to running sfc / scannow.

    4 new admin - account when I created a new Admin account, all existing programs were available, and it is the behavior, I expect in all cases.  You won't see any desktop shortcuts because they belong to each account, but programs should be in the Start button, all programs lists.  You can get access authorization in the administrator account to access your existing user account & copy from there, desktop shortcuts if you wish but you must a first full backup or your next routine backup of user account will consider each unique as user data file being modified.  After you change the permissions, you can then run [I think you need a command prompt to run as administrator again] attrib - a/s of your folder my documents [check syntax using attrib /?] to reset all the data user file archive bits & therefore prevent everything back up again.

    5 reinstaling the OS solve the missing documents & settings folder.  I've seen discussions in this forum about putting on another partition data files, but you will need to pick up this topic because I never paid much attention to it.  Before doing [and this is just speculation], try to run then by saving a file from your older pre-Win7 application to see if Win7 itself can recreate the Documents & Settings folder when an older application that calls a configuration file or a backup procedure.  If it works, it would save you a lot of aggravation.  Alternatively, since the Documents & Settings folder must be called on what using an old pre-Win7 application, if your older application may perform & record properly without it then don't bother doing a re-install at all.

    Good luck with everything cela - and once more just to avoid misunderstandings, I've never seen a report on the Documents & Settings folder has been deleted, so I can't give advice without the benefit of a direct experience.

  • hr_assignment_api.update_emp_asg_criteria - contact your system administrator citing the procedure and step 40.

    Hi all

    I looked online and found this question popping up but without a clear solution.

    I have reduced API hr_assignment_api.update_emp_asg_criteria to a minimum and still can't seem to update my existing assignment. I use all the current values on the assignment so I know that all values are valid and configuration. Also, I checked and my people flexfield group is enabled and allowing the dynamic insertion. I also ran:

    INSERT INTO fnd_sessions (session_id, effective_date)

    Select ('sessionid'), SYSDATE USERENV

    of the double

    If USERENV('sessionid') not in (select SESSION_ID from fnd_sessions);

    Any help would be greatly appreciated!

    I get the error:

    Error report-

    ORA-20001: System error: procedure in step 40

    Cause: The procedure created a mistake in step 40.

    Action: Contact your system administrator citing the procedure and step 40.

    ORA-06512: at "APPS.HR_ASSIGNMENT_API", line 17385

    ORA-06512: at "APPS.HR_ASSIGNMENT_API", line 15701

    ORA-06512: at "APPS.HR_ASSIGNMENT_API", line 15486

    ORA-06512: at line 26 level

    And here is my code:

    DECLARE

    ln_special_ceiling_step_id PER_ALL_ASSIGNMENTS_F.SPECIAL_CEILING_STEP_ID%TYPE;

    lc_group_name VARCHAR2 (30);

    ld_effective_start_date PER_ALL_ASSIGNMENTS_F.EFFECTIVE_START_DATE%TYPE;

    ld_effective_end_date PER_ALL_ASSIGNMENTS_F.EFFECTIVE_END_DATE%TYPE;

    lb_org_now_no_manager_warning BOOLEAN;

    lb_other_manager_warning BOOLEAN;

    lb_spp_delete_warning BOOLEAN;

    lc_entries_changed_warning VARCHAR2 (30);

    lb_tax_district_changed_warn BOOLEAN;

    -Select * from per_all_assignments_f where assignment_id = 18525;

    ln_ORGANIZATION_ID PER_ALL_POSITIONS.ORGANIZATION_ID%TYPE: = 612;

    ln_LOCATION_ID PER_ALL_POSITIONS. LOCATION_ID % TYPE: = 161;

    ln_job_id PER_ALL_POSITIONS. JOB_ID % TYPE: = 76;

    ln_grade_id HR_ALL_POSITIONS_F.entry_grade_id%TYPE: = 84;

    ln_assignment_id PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_ID%TYPE: = 18525;

    ln_person_id NUMBER: = 23729;

    ln_object_number NUMBER: = 5;

    ln_people_group_id NUMBER: = 2410;

    BEGIN

    () hr_assignment_api.update_emp_asg_criteria

    p_effective_date = > trunc (sysdate),.

    p_datetrack_update_mode = > "CORRECTION."

    p_assignment_id = > ln_assignment_id,

    p_location_id = > ln_LOCATION_ID,

    p_grade_id = > ln_grade_id,

    p_job_id = > ln_JOB_ID,

    p_organization_id = > ln_ORGANIZATION_ID,

    p_people_group_id = > ln_people_group_id,

    p_object_version_number = > ln_object_number,

    p_special_ceiling_step_id = > ln_special_ceiling_step_id,

    p_group_name = > lc_group_name,

    p_effective_start_date = > ld_effective_start_date,

    p_effective_end_date = > ld_effective_end_date,

    p_org_now_no_manager_warning = > lb_org_now_no_manager_warning,

    p_other_manager_warning = > lb_other_manager_warning,

    p_spp_delete_warning = > lb_spp_delete_warning,

    p_entries_changed_warning = > lc_entries_changed_warning,

    p_tax_district_changed_warning = > lb_tax_district_changed_warn

    );

    END;

    It turns out that all of my trouble was because of NLS parameters in SQL Developer. Tools > settings > database > NLS. Now, I chose to ignore the settings NLS and things work much better.

  • Stored procedures and system procedure

    Hello

    using dreamweaver CS on windows XP for ASP VB - websites with MS SQL Server 2005.

    When I try to add a command through the server Berhaviors I d like to access a stored procedure.
    1.) create new Web asp.vb
    2.) click on the 'Application' window and tab "server behaviors".
    3.) click on the "plu" and choosing "Comand".
    4.), adding the name of the command, the checkbox "Recordset" activated, adding the name of the Recordset, chhosing the connection
    5.) choice Type "stored procedure".

    Everthing works fine. But now:

    (6.) by clicking on the '+' next to 'stored procedures '.
    (7.) NOW the dreamweaver becomes a list of all THE stored procedure in the database

    Problem: Sql server has a lot of system procedures. It will never be used in a web application. So DW is on all fours on the server database for all procedures and not only those necessary (added by an ordinary database user / owner.)

    It takes a very, very long time, until the DW has all the names! Up to two minutes. In the old version of dreamweaver, the dreamweaver was just view regular - procedures not system procedures. If dreamweaver has been an excellent tool to develop web applications of high leverage comfortable.

    Now, the time is too long. Whenever I want to add a new command, I have to wait and wait.

    Is there any solution autour (configuration settings, filter setting, what ever) that the dreamweaver receives only regular procedures again?

    Also see the screenshot on http://www.fanclubs.ch/dwcs.jpg

    The solution is here:
    http://KB.Adobe.com/selfservice/viewContent.do?externalId=tn_15720&sliceId=2

    has not resolved by support here. was not solved by the helpline. Has been solved by myself to the research on the everyday life of the website with other disorders and finally found.

  • 6s unlocked IPhone be locked after erase all content and settings

    6 s unlocked IPhone has been locked after erase all content and settings

    This statement should help you to disable find them my iPhone Activation Lock - Apple Support

  • If I type 'Erase content and settings' from my iphone 6, will be that all deleted texts be permanately deleted?

    If I type 'Erase content and settings' from my iphone 6, will be that all deleted texts be permanately deleted?

    Yes.

  • Erase content and settings - this applies to specific iPhone or will this affect other devices in my iCloud?

    Can I delete content and settings on my old iPhone 5 without changing anything on my iPhone 6 or iMac?

    Yes. Erase content and settings don't apply that to the device you are running on.

    He doesn't to iCloud or all other connected devices.

  • Erase content and settings, I forgot my 4 digit password

    I would like to sell my camera and I want to erase content and settings, it asked me password to 6 digits I knew but then asked me a password 4 digit which I don't know or don't remember to have? What should I do? or how can I know what is the 4 digit passcod? Thank you

    If you forgot a password, you will need to restore the device. See this support document for instructions. If you have forgotten the password for your iPad, iPhone or iPod touch, or your device is disabled - Apple supports

    In addition, if you are wanting to sell the camera, you need more than just erase the content and settings. See the information contained in this document to help support. What to do before you sell or give away your iPhone, iPad or iPod touch - Apple Support

  • every time I erase content and settings on my iphone 6 after reset at the start of my phone and after crossing the screen as Hello &gt; select language &gt; Connect wifi &gt; my iphone doesnot ask me activation lock even if my unit is also found on

    every time I erase content and settings on my iphone 6 after reset at the start of my phone and after crossing the screen as Hello > select language > wifi connection > my iphone doesnot ask me lock activation that says that your iphone is connected with the old apple ID, please enter the id and password

    I always reset on find my optional equipment please tell me how to activate locking activation so that whenever I have factory reset my phone with finding my camera so my phone always ask an old apple and password

    I do not understand your question, but let me go with what I believe. Looks like you entered in iCloud and erased all the content and settings on the iPhone, and once you go by assigning back up again, you do not see something that you expect to see, for example, a request for an Apple ID. When you go through the installation process to select the language, etc., it must, at some point, ask you to identify yourself with your Apple ID. are you not see this?

    It would be better if you try to describe exactly what you do again. Also, without the help of any sign of punctuation, it is difficult to track everything you ask. Try providing the steps of what you do, and then what you see when you get to the point that you believe that something is going wrong. You mention both an old and new Apple ID, which is rather confusing.

  • Transfer files and settings to a new MBP

    When transferring files and settings from my current MBP to a new MBP, this also automatically will install all the applications installed on my MBP on my MBP again?  Also, I run Parallels and Windows on my current Mac and I was wondering if I could transfer these licenses on my new Mac, or do I pay for the new licenses?

    If yo select this option to copy all the information on the new Mac applications is also copied. You may need to bury your license number for Parallels.

Maybe you are looking for