Two Questions, sure enough the answer is simple.

Hello
I get the following error on a trigger, I wrote.

LINE/COL ERROR
15/49 PLS-00103: encountered the symbol "FIND" when expecting one of
What follows:
in like LIKE2_ LIKE4_ LIKEC_ between members SUBMULTISET_

I was wondering what causes this error and how would approach I set?

The trigger in question is
-----
CREATE OR REPLACE TRIGGER old_job_analyst
BEFORE the update job ON emp
FOR EACH LINE
WHERE (old.job = 'ANALYST')
DECLARE
v_minsal sal.losal%TYPE;
BEGIN
It SELECT
IN v_minsal
BY sal
WHERE rank = 5;

IF new.sal < v_minsal then
RAISE_APPLICATION_ERROR (-20002, ' remuneration must be at least 5 class ");
END IF;

EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE_APPLICATION_ERROR (-20001, could not find the salary classes, contact support!');

WHILE OTHERS THEN
RAISE_APPLICATION_ERROR (-20000, 'Database error');

END;
/
-----
The other error I get is

LINE/COL ERROR
10/7 PLS-00049: bad bind variable "V_COUNT.

Since the following trigger
-----
CREATE OR REPLACE TRIGGER s1
BEFORE insertion or update OF moduleid WE studentallocation
FOR EACH LINE
WHERE (new.stuid = 'S1')
DECLARE
v_count number (1);
BEGIN

SELECT count (*)
IN v_count
OF studentallocation
WHERE stuid = "S1" AND moduleid = "M5" GOLD stuid = "S1" AND the moduleid = "M6".

If: v_count = 1 then
RAISE_APPLICATION_ERROR (-20001, 'Student S1 can't take the two M5 AND M6');
end if;
END;
/
-----
Any help would be appreciated, but it would be very helpful if you could explain to me what has caused these errors, so I can fix it myself in the future.

Thank you very much
Joe

Try

create or replace trigger old_job_analyst
   before update of job
   on emp
   for each row
   when (old.job = 'ANALYST')
declare
   v_minsal   sal.losal%type;
begin
   select losal
     into v_minsal
     from sal
    where grade = 5;

   if new.sal < v_minsal
   then
      raise_application_error (-20002, 'Pay needs to be at least grade 5');
   end if;
exception
   when no_data_found
   then
      raise_application_error (-20001,
                               'could NOT find pay grades, contact support!'
                              );
   when others
   then
      raise_application_error (-20000, 'database error');
end;
/

create or replace trigger s1
   before insert or update of moduleid
   on studentallocation
   for each row
   when (new.stuid = 'S1')
declare
   v_count   number (1);
begin
   select count (*)
     into v_count
     from studentallocation
    where stuid = 'S1' and moduleid = 'M5'
          or stuid = 'S1' and moduleid = 'M6';

   if v_count = 1
   then
      raise_application_error (-20001,
                               'Student S1 cannot take both M5 AND M6'
                              );
   end if;
end;
/

Tags: Database

Similar Questions

  • I forgot my password and not sure of the answer to my secret question so impossible to singin' or reset the password

    Hey there, I got my password of windows live account * address email is removed from the privacy *, I'm also not sure of the answer of the secret question... but my what is important, I still have access to my email in this account, and I think it would be useful to reset my password accouns, HELP

    Please carefully follow all of the steps on the Recovery Windows LiveID account Help Page.

    Sorry, we can not help you with your Hotmail account number in the Microsoft answers Forums.

    Kind regards.

  • two questions, hands on the record and SR/PR prometric IDs?

    I sent my questions to ocpexam_ww and get contradictory answers. I have two questions.

    1. in the past five years, I took the following courses: RAC, Linux for the DBAs, GRID, Performance Tuning, backup/restore, Admin workshop I, Admin Workshop II in different cities. I have certificates and registration IDs (even if we have a sticker quillogy gold covering the registration ID). I presented the eligible courses qualifications 'Hands on' on my account prometric I intend to get the oca, ocp, linux, network and perhaps rac certifications over the next five years. My account shows that two registered practical courses and anyone ranked my comments for other courses them marked as failed. I asked ocpexam, and they say that the first two are enough for the OCP. I know and understand that, but rather that the other doesn't have a marking would it not better mark their past for the qualifications of potential future certification? Especially since each class cost me around $6 k in travel, accommodation and registration?

    2. I have two accounts prometric which I asked to reconcile, but ocpexam response (s) that they have no record of them. My transition from 1z0 - 042 was recorded under a number of "PR #", while my hands previously mentioned Records are registered under number "SR # What should I do? I take today 1z0-007 and 1z0-043 before switching to the seller.

    1 failure hands on classes of forms: form of the House of Commons that you submit is directly related to a specific path. If you have submitted several courses for a certification path - 10g OCP DBA form, for example, one would be accepted or "passed." Others would be stranded because if they were to be used for the other certification paths, they would need be submitted by using a different key code.

    2 fusion ID: looks that OCP team could not find a record of your exam 1Z0 - 042 - is - right? So, go ahead and submit your request to ocpexam and let them know that you submitted this application before and they have been unable to find the folder of 042 review. Provide as much information as possible - all Prometric ID. And ask them to move forward and get worse if they cannot locate the 042 record so that this can be settled before the passage of Prometric to VIEW.

    Kind regards
    Brandye Barrington
    Certification Forum Moderator
    Manager certification program

  • HELLO, I'M FACED WITH A PROBLEM WITH MY SECURITY QUESTIONS, I FORGOT THE ANSWERS AND NOW I CAN'T RESET, CAN YOU HELP ME?

    Hello

    I AM FACING A PROBLEM WITH MY SECURITY QUESTIONS.

    I FORGOT THE ANSWERS AND NOW I CAN'T RESET, CAN YOU HELP ME?

    Hello

    You will need to contact the Apple Support. (Nobody here can reset your security for you questions: it is a community based on the user, not the Apple Support).

    Contact information for the Apple Support:

    Contact Apple for assistance with the security of the Apple ID - Apple Support accounts

  • two questions relating to the OBIEE 11 g Linux installer

    Hello

    1. do we need to install JDK 1.6 and above before installing OBIEE? as in below post what OBIEE uses it's own JDK.

    OBIEE 11 g on Windows 7 (64-bit)

    2 we need configure the DHCP in Linux loopback adapter as well as we do in windows? If yes how to do it in Linux?



    Please let me know the answers as soon as POSSIBLE.

    Thank you
    Jay.

    Hi Jay,.

    1. do we need to install JDK 1.6 and above before installing OBIEE?

    Not required

    2 we need configure the DHCP in Linux loopback adapter as well as we do in windows? If yes how to do it in Linux?

    On Linux x 86 operating systems, configure the host to resolve to the IP address of the loopback host names by editing the file/etc/hosts to contain the following entries:

    127.0.0.1 nomhote.nomdomaine hostname
    127.0.0.1 localhost.localdomain localhost

    After that, make sure that the host name resolves to the loopback IP address by typing the following command:

    / bin/ping nomhote.nomdomaine

    Kind regards
    DpKa

  • Question - and I'm sure that the answer is quite simple...

    I am very new to Dreamweaver, which I am running CS5 on a Vista operating system. My pages look good, until I get a preview in a browser, how the images just don't show, appearing instead as a Blue Cross. I don't know it's probably something very simple, a setting somewhere either in Dreamweaver itself on browsers, or even just within Windows itself, but I just can't get out... and it is difficult to progress until I do. We take only test dummy web pages, not whatever it is complicated or actually go live - I'm still very much of a learner. Thanks in advance for any help...

    This is a relative link to the ROOT.  You must fully understand the difference between the relative root and document links before using these.

    Anyway, root relative links WILL NOT appear in the preview unless you have activated the PREFERENCES > Preview in browser > preview use Temp files.  There is no real downside to enabling this feature.

  • After asking a question, I found the answer myself. How to mark it as "answered"?

    There is a button to press if someone else answers the question, but not if I find a solution myself.

    I believe that if you reply to your post that the problem is solved, the moderator of the forum will come along after a week or two and mark responded.

    Good luck

  • Two questions relating to the signature using restricted code API: s

    First question

    I have a library that contains classes that requires the signature in order to use API:s. limited one of the functions in the library uses "persistent storage". My application accesses the library import library module, then instanciates and calls the function that I need.

    Is it enough to have signed library or don't call asking the library must sign too?

    Second question

    Is it possible to configure the simulator so it actually tests that the modules using API: s limits are signed correctly?

    Check the Simulator definition "activate the safety of the device. When this setting is enabled, the Simulator checks would be signatures almost like a true pocket computer. For your application, which should be pretty good. If your module is missing a required signature, the simulated Pocket will complain even as would a normal hand.

  • Two questions - cannot save the printer shares with the error code 0x000006d9 and part of the Machine is not accessible from the network of working groups

    I think this are problems, but here is the separately questions, first of all - the basics:

    4 PC network using the working group with two Windows 7 (ultimate) and two xp.  Everything worked fine with the a previous vista / xp 3 network.  All except the Windows 7 Desktop behave well. The network is connected with a modem cable to a 5XT netscreen NS (firewall hardware to the outside and the inside hub), a netgear wireless access point and Windows workgroup use (as mentioned above).  Name all is correct on all machines, all the discovery settings are in place and each has Norton Internet security for its local protection services. Upgrades of Windows 7 have been computer vista laptop connected wireless and wired desktop previously running XP Professional sp3.  XP conversion was assisted on the desktop of the wizard upgrade Laplink PC Mover.  Applications executed in appearance on the two level computers.

    On the desktop - I can't share printers. When I use "networks and printers" in the start menu to share on a printer I get code 0x000006d9 error saying something like the configuration cannot be saved.  All local jobs printing works well.

    On the desktop - the name of the computer records also of all as on the network (it is discovered and mapped by each PC) but when I try to access it from any other machine I get a general error says something like "check your spelling of the name mannequin." This desktop computer Win 7 can browse shared folders on the network of and write about everything.  Somewhat added data - this device can ping all others in the network sucessfully but none get a ping successfully into the offending machine either with ip address or computer name (times out waiting for a response or said the name is not found).  He himself can ping successfully.  It accesses the internet very high hand.

    Solutions have been attempted without a firewall (Firewall Norton Smart Internet - 2010), with the firewall and various changes to authorization.  A final discovery was that Windows Firewall will not allow because BFE is not able to start - error 5 - access denied (this was discovered by train to allow a possible solution because of some internet chatter that the Windows Firewall must be running to implement shared printers).  All other dependencies are running to get a break on why BFE is not (it turns on the Win 7 laptop as well as the firewall).  Authorizations have been verified in the registry for settings of firewall and BFE (ports, permits, etc.) have also been looked at with a very critical eye.  SFC has been run with no problem.  All ports for net drivers, Win 7 networking and other actions are open in the firewall.

    Then people - I did some internet research and I tried a lot of suggested solutions nothing doesn't.  My apologies in advance if a person provides a solution and I say "tried".  Any help is very appreciated

    You can mark this as resolved problem!
    The program involved, causing this error is firewall Windows, here is what you need to do to fix this...
    If like me you have disabled windows firewall, I use Security Suite of ZoneAlarm, you will need to re-enable the firewall to share the printer.

    If you have disabled or turned off the Windows Firewall. (and in my case this error was caused by exactly that)
    Step #1 - disable any other firewall can be installed. Stop to load at startup and restart your PC.

    Step #2 - go to the tools of Admin folder > Services > Windows Firewall > double click and is it set to manual or automatic and keep it.

    Step #3 - open Control Panel > system & security > Windows Firewall > enable or disable the Windows Firewall > (Enable) turn on the Windows Firewall > save
    Then go to Restore Defaults > click on restore default button > save
    (you only do this IF you have changed the settings of the firewall, but it is always a good idea and will ensure that there are no problems during the proceeding)

    Step #4 - click Control Panel Home > view devices & Printers > Select / click on your printer > screen printer properties > share > share this printer > OK

    Step #5 - go back to firewall Windows and the tower he walks back > save

    Step #6 - go back to Services > and the Manual value Windows Firewall (or turn it off if you want, I recommend the manual)

    Step #7 - reboot and re-enable your firewall preferred to start at startup > Reboot

    Step #8 - take a deep breath and sigh of relief! :)

  • Two questions relating to a so-called simple dynamic SQL

    Version: 10 gr 2

    Question1. Why is - this simple anonymous block to return the names of the tables and their stats collected date does not?
    declare
    v_rs date;
    
    begin
         for i in (select table_name from user_tables)
              loop
              execute immediate 'select last_analyzed from user_tables where table_name = ' || i.table_name||  ' into v_rs';
              dbms_output.put_line('i.table_name '||v_rs);
         end loop;
    end;
    See the error of the actual execution below.




    Question 2 of SQL * Plus formatting:

    If you look at the performance below, you may notice that despite long lines at 5000, why is the line with immediate execution IE.
    execute immediate 'select last_analyzed from user_tables where table_name = ' || i.table_name||  ' into v_rs';
    go to the second line
    7    execute immediate 'select last_analyzed from user_tables where table_name = ' || i.table_name
    ||  ' into v_rs';
    The actual execution
    SQL> set pages 100
    SQL> set lines 5000
    SQL> declare
      2  v_rs date;
      3  
      4  begin
      5   for i in (select table_name from user_tables)
      6    loop
      7    execute immediate 'select last_analyzed from user_tables where table_name = ' || i.table_name
    ||  ' into v_rs';
      8    dbms_output.put_line('i.table_name '||v_rs);
      9   end loop;
     10  end;
     11  /
    declare
    *
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    ORA-06512: at line 7

    You should always use EXECUTE IMMEDIATE!

    Like this:

    declare
      v_rs date;
      v_sql varchar2(600);
      v_table_name varchar2(200);
    begin
      v_table_name := 'DEPT';
      v_sql:= 'select last_analyzed from user_tables where table_name = ''' || v_table_name||'''';
    
      dbms_output.put_line(v_sql);
    
      EXECUTE IMMEDIATE v_sql into v_rs;  
    
      dbms_output.put_line(to_char(v_rs, 'dd/mm/yyyy hh24:mi:ss'));
    --  dbms_output.put_line(i.table_name ||v_rs);
    end;
    /
    
  • I want to reset my security question I forgot the answers? BUT I don't see any options, when I try to reset, saying "reset the security questions? Help, please

    I tried to change my security questions that I forgot my answers, but I don't see any option to reset security issues?

    Need help please, I'm stuck with this?

    Will be appreciated if helped.

    Thank you

    SKLB

    Look at this article. In my view, that information can help you. If you forgot your Apple ID - Apple Support security questions answered

  • Two questions about upgrade the sensor software

    Hello

    my questions are:

    -can I put image recovery partition for a camera of the ID of the ID - MC?

    -I can make the signature version for a camera of the IDM IDS?

    ... or in both cases I have to type the 'upgrade' in the sensor cli command?

    Thnks,

    Graz.

    You can upgrade the signature of IDM version. (Be it with Setup-> auto update or Administration-> update).

  • Two questions relating to the archive redo logs with RMAN backup

    DB version: 11g

    I am new to RMAN.

    My database is in ARCHIVELOG mode. I intend to make a weekly backup for my db (02:00 every Monday). There will be all the incremental backups between these windows(Monday-to-Monday) of backup that I have would function for retrieving archived redo logs.


    Question1.
    I want to save the archived logs every day (for example at 23:00). How can I configure that?

    These are the configuration setting, that I intend to implement. I don't know how to set up the archive log backup
    configure default device type to disk;
    configure retention policy to redundancy;
    configure device type disk parallelism 1;
    configure channel 1 device type disk clear;
    configure channel 2 device type disk clear;
    configure channel 1 device type disk format '/u05/rman1/datafiles/rmnabackup1_%U';
    configure channel 2 device type disk format '/u05/rman2/datafiles/rmnabackup2_%U';
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '/u05/rman1/control_files/rmnabackup1_%U';
    Question2.
    After that a new full backup is taken at 02:00 on Mondays, the archived redo logs accumulated since the last 7 days become unnecessary. How can I automate the removal of the archive redo logs with RMAN?

    Archive the log delete them all input command will take the destination of the log archiving log backup archive and delete this destination.

    In the log archive destination he has archived log in the sequence 1 to 100 then will he take the backup and delete any of the destination (Monday 23:00).

    In the log archive destination he has archived sequence journal 101 to 150 then will he take the backup and remove those in the destination (Tuesday 23:00).

    In the log archive destination he has archived log in the sequence from 151 to 180 so will he take the backup and delete any of the destination (Wednesday 10:00).

    It will continue like that.

    Concerning
    Asif Kabir

    -If you help brand the response as correct/useful.

  • Re: Two questions on the recovery of my Satellite C850 / 09L

    Hello

    I had an unfortunate accident with a drink and my C850 / 09L while in the hospital, and while he was cleaning that I used my external hard drive on an old computer.

    Long story short, while making the usable drive I have in some way managed to make the unreadable UEFI and need a recovery disk to fix it (which I did not cause of course I was in the hospital when the laptop was given to me).

    I have two questions:

    (1) the recovery disk creator organize files in a specific way, or can I copy the whole partition on a USB flash drive and make it work?

    and

    (2) if I am able to use the recovery partition copied or obliged to buy a Toshiba drive, the recovery disk difficulty will be just the OS or it will wipe my files as well?

    1 / recovery disc Creator create a special bootable media that can be used for the installation of laptop recovery image. If you want to install the recovery image, you MUST create this bootable media.

    2 / Yes Yes please before you use it to backup all your important data.

    If you have any other questions you are welcome.

  • My new Thinkpad S1 Yoga has two questions

    I got myself a Thinkpad S1 Yoga (20cd) and I have two questions;

    (1) the wireless lan driver fails and booting. (Dual band AC 7260)

    (2) the trackpad acts as a simple mouse. (ultranav driver is installed)

    I am running Windows 8.1pro (x 64). All the drivers are updated and updated the BIOS.

    Driver wireless lan starts normally when I disable the USB3 support in the bios or disable it "Intel (r) USB 3.0 eXtensible Host Controller - 0100 (Microsoft)" in Device Manager of.

    When I enable and disable the driver lan wireless driver again operating normally.

    The trackpad does not support actions such as scrolling.

    Kind regards

    Roberto

    Well the ultrapads issue is resolved. I uninstalled the ultrapads driver and the driver synaptics windows. After the reboot, the pavement was a standard ps/2 mouse to the microsoft driver. Change install the latest driver from ultrapads I have a thinkpad tab in the mouse control panel.

Maybe you are looking for