Impossible to establish a procedure to have conditional statements of selection

Hi all

I'm unable to compile a procedure in Oracle. Details of procedure and error are:

CREATE or replace PROCEDURE jioworld.userNotification (usid in NUMBER, type IN VARCHAR (50))

BEGIN

IF (Typ = 'message')

THEN

SELECT unt.id, nt.notificationText, nt.messageId, unt.userId, nt.createdBy, nt.creationDate, unt.status FROM notification_ INNER JOIN userNotification_ unt nt ON nt.id = unt.notificationId WHERE unt.userId = usid AND unt.status = 'New' AND nt.messageId IS NOT NULL ORDER BY unt.id DESC;

ON THE OTHER

IF (type = 'user')

THEN

SELECT unt.id, nt.notificationText, nt.messageId, unt.userId, nt.createdBy, nt.creationDate, unt.status FROM notification_ INNER JOIN userNotification_ unt nt ON nt.id = unt.notificationId WHERE unt.userId = usid AND unt.status = 'New' AND nt.messageId IS NULL ORDER BY unt.id DESC;

ON THE OTHER

IF (Typ = 'all')

THEN

SELECT unt.id, nt.notificationText, nt.messageId, unt.userId, nt.createdBy, nt.creationDate, unt.status FROM notification_ INNER JOIN userNotification_ unt nt ON nt.id = unt.notificationId WHERE unt.userId = usid AND unt.status = 'New' ORDER BY unt.id DESC;

END IF;

END;

/

Error getting as follows:

  • Error (23.4): PLS-00103: encountered the symbol ";" when expecting one of the following values: If

I don't get exactly how to fix the error. Kindly help me to do the same.

Kind regards

Vishal

Ah... Yes one more thing:

you do not have

If a single with two "else if" is, but you have 3 fi nested

IF... THEN

ELSIF... THEN

END IF;

is not the same as

IF... THEN

ON THE OTHER

IF... THEN

END IF;

END IF;

the compiler supports the end of your procedure should stop if you have two open the fi to this place...

HTH

Tags: Database

Similar Questions

  • All of a sudden I can't order prints on my computer. I get a message saying that it is impossible to establish a connection. That is what it is?               NG who

    All of a sudden I can't order prints on my computer. I get a message saying that it is impossible to establish a connection. That is what it is?

    It is almost impossible to help until that give you more details.

    • What application or website are you trying to order prints of?
    • Which iMac do you have?
    • What version of Mac OS X are you using? Is it really 10.6.8?
  • can't print-impossible to establish a two-way communication

    Win7, Lemark printer with a USB connection.  I move the printer to a Win7 computer, where he worked on another computer.  I wanted to use a longer USB cable but removes any new variables I use the same USB cable.  I deleted everything I can find on printing and downloaded the new drivers and install, several times.  As part of the installation, I can print allignment page.  However, when I try to print a test page, I get the message that it cannot print because it is impossible to establish a two-way communication and go into the Setup menu and set two-way communication.  I go to the ports tab in the setup of details and the checkbox for two-way communication is grayed out, so it cannot be set.  How can I get this impression of installation?

    Hi Hustlinghare,

    -What is the exact full error message?

    Printing problems can be caused by cables that are not properly connected, corrupt, drivers, incompatible drivers, the printer settings, missing updates and problems with your printer.

    I suggest you check out the link for help that is designed to help you identify and fix common printer problems in Windows, including print errors, print spooler errors, and other issues that could prevent you from printing.

    Solve printer problems

    http://Windows.Microsoft.com/en-in/Windows/printer-problems-in-Windows-help#fix-printer-problems=Windows-7&V1H=win8tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    For more information, refer to the article below.

    Why can I not print?
    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-print

    Let us know the status of the issue. If you need help, please after return. We will be happy to help you.

  • Procedure of the ODI - Bind Variables in the conditional statements

    In an ODI procedure, is it possible to add a conditional statement around bind variable?  For example, if I use OdiOutFile as the command on the target and Oracle as the command on the Source, I can use bind variables to fill the data in this table (we are in fact using OdiInvokeWebService and passing a XML structure very complex, but it's easier for testing):

    OdiOutFile-FILE = C: / TEST. TXT

    < person >

    < first > #FIRSTNAME < / first >

    < Middle > #MIDDLENAME < / Middle >

    < last > #LASTNAME < / last >

    < / person >

    It is a way to add a conditional statement using one of these bind variables?  For example, if I wanted to test #MIDDLENAME null and null value, produced this portion of XML, such as:

    OdiOutFile-FILE = C: / TEST. TXT

    < person >

    < first > #FIRSTNAME < / first >

    < % if (#MIDDLENAME! = null) {% >}

    < Middle > #MIDDLENAME < / Middle >

    < %} % >

    < last > #LASTNAME < / last >

    < / person >

    This type of scriptlet syntax seems to work fine, as long as the binding variable is not in the mix (if I put "true is true" or "true == false" in the case, it shows or does not show this line in the XML file, as expected).  I use ODI 11.1.1.7.0

    ----------------------

    Post edited by: KevinPratt

    Thanks for the reply!  As suggested, in what follows, I changed the command and it works as you want

    OdiOutFile-FILE = C: / TEST. TXT-APPEND

    < person >

    < first > #FIRSTNAME < / first >

    < @ if (!) (("#MIDDLENAME".equals(""))) {@ >}

    < Middle > #MIDDLENAME < / Middle >

    {< @} @ >

    < last > #LASTNAME < / last >

    < / person >

    Using the syntax <@ ...="" @="">serve your purpose. Also, I think you might want to include the variable binding in the quotation to avoid syntax errors.

  • an odi procedure will have another odi procedure?

    an odi procedure will have another odi procedure? If so, how?

    This can be done by compiling the procedure as a scenario and then call it from the parent procedure by using the OdiStartScen tool

  • How to enable a user to establish a procedure of spacific

    A need to change user rights and then compile a procedure for this I give following command, but the goal was not possible. What should I do?
    Grant all on the_procedure to the_user.
    Of course said user is not the owner of this procedure.

    The execute privilege only allow the user to establish another procedure of diagrams, the user compilation would need privilege 'ALTER ANY PROCEDURE', which is bad.

    You could get it with a stored procedure in the schema that owns the procedure that you want to compile, this stored procedure can be coded to compile the procedure, then you give privs to run this procedure compilation to your other user, you can control what procedures the other user can compile and failed to give her access to compile anything like that.

    Thank you
    Paul

  • Under regions and conditional statements

    Greetings. Having a problem with conditional statements and subregions. With the help of apex 4.2

    I have a region (mutations) that has several items and a few buttons (button A, button B, etc.). I need to display conditionally button A. I have a sub region (People), which is a report of people deployed. I need a button to display the area of deployments, if there is no people in the report (People_ID is null) then the button will not appear. I tried to use a conditional, but I am not having any luck. Help, please. Thanks in advance.

    NewApexCoder wrote:
    I just tried to use a conditional button

    Condition Type: Point value / expression column 1 is NULL
    Expression 1: PEOPLE_ID

    This doesn't seem to work for me.

    No, it does not. (The inclusion of 'column' in this type of condition is inadequately documented. A "column" name only are referenced by such a condition, after presentation of a form in a table.)

    Use a Exists (SQL query returns at least one row) condition, based on the query in the subregion to report.

  • Conditional statement to improve the functions of navigation bar

    Question of AS2:

    I have created a navigation bar of four buttons with the normal state in box 1 and place the cursor in the frame of 10, 20, 30 and 40, States.

    Hover States are made by adding a mask on each button to reveal a layer of color differetly on frame 10, 20, 30 and 40

    I have scripted buttons like this:

    on (rollover) {gotoAndPlay (10);}

    }

    (deployment) {gotoAndStop (1);}

    }

    (press) {gotoAndPlay (1);}

    }

    on (release) {gotoAndPlay (9)}

    }

    On the four frameworks there is also an action that says:

    Stop();

    to import flash.external.ExternalInterface;

    {btn1.onRelease = Function ()}

    ExternalInterface.call("saveglobalscore",score) ("f1");

    }

    It all works well. The button triggers a javascript function on the page.

    Request:

    Can I do the buttons stay in addition to their States when a button is clicked, so it serves as a clear marker that the viewer of the page selected and seeks to?

    Page loading on the release, but as soon as the pointer leaves the button, the command deployment on-site the playhead to frame 1 (with the normal state)

    (1) is the following:

    Put a conditional statement to say frame 1:

    If the read head came to frame 10 then go to section 10 and stop.

    If the read head came to frame 20, then go to section 20 and stop.

    If the read head came to frame 30 then go to frame 30 and stop.

    If the read head came to frame 40 then go to the frame of 40 and stop.

    Another thing: stay on the frame 1.

    ?

    (2) or is there another solution that I have not thought?

    Often, it would be useful to be able to follow where the read head just left for example with scroll on the side and other advanced layouts.

    Is this possible and if so, how?

    Thank you in advance.

    ggaarde

    var mcA:Array = [mc1, mc2, mc3,...];

    for (var i: int = 0; i<>

    .Ivar mcA [i] = i;

    mcA [i] .buttonMode = true;

    mcA [i] .addEventListener (MouseEvent.MOUSE_OVER, overF);

    mcA [i] .addEventListener (MouseEvent.MOUSE_OUT, outF);

    mcA [i] .addEventListener (MouseEvent.CLICK, clickF);

    }

    function overF(e:MouseEvent):void {}

    MovieClip (e.currentTarget) .gotoAndStop ("over");

    }

    function outF(e:MouseEvent):void {}

    {if (MovieClip (e.currentTarget) .lastClicked)}

    MovieClip (e.currentTarget) .gotoAndStop ("clicked");

    } else {}

    MovieClip (e.currentTarget) .gotoAndStop ("up");

    }

    }

    function clickF(e:MouseEvent):void {}
    for (var i: int = 0; i<>

    {if (mcA [i]. Clicked)}

    mcA [i] .gotoAndStop ("up");

    }

    }

    MovieClip (e.currentTarget) .gotoAndStop ("clicked");

    do something else. has clicked the button movieclip MovieClip (e.currentTarget) .ivar th

    }

  • Conditional statements in IE6 error?

    http://MCEC.my/

    I have added a conditional statement that only target IE6 to render css and javascript.

    all other browsers, IE7 and before use will support the general set of css and js...

    However when I saw in IE 6 and IE7 I pulled out the rendering of the conditional statement:

    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

    < title > Malaysia - China Entrepreneur Conference 2012 < /title >

    <!-[if! IE6] >->

    < link href = "include/reset.css" rel = "stylesheet" type = "text/css" / > "

    < link href = "include/style.css" rel = "stylesheet" type = "text/css" / > "

    < link rel = "stylesheet" href = "include/room-slider - styles.css" type = "text/css" / >

    "< script type =" text/javascript"src="include/jquery-1.7.2.min.js "> < / script >

    "< script type =" text/javascript"src="include/coin-slider.min.js "> < / script >

    < script type = "text/javascript" src = "include/bw - menu.js" > < / script >

    <!-<! [end if] >->

    <!-[if gte IE7] >

    < link href = "include/reset.css" rel = "stylesheet" type = "text/css" / > "

    < link href = "include/style.css" rel = "stylesheet" type = "text/css" / > "

    < link rel = "stylesheet" href = "include/room-slider - styles.css" type = "text/css" / >

    "< script type =" text/javascript"src="include/jquery-1.7.2.min.js "> < / script >

    "< script type =" text/javascript"src="include/coin-slider.min.js "> < / script >

    < script type = "text/javascript" src = "include/bw - menu.js" > < / script >

    <! [end if] >->

    <!-[if lte IE6] >

    < link href = "include/reset.css" rel = "stylesheet" type = "text/css" / > "

    < link href = "include/style.css" rel = "stylesheet" type = "text/css" / > "

    < link rel = "stylesheet" href = "include/room-slider - styles.css" type = "text/css" / >

    "< script type =" text/javascript"src="include/jquery-1.7.2.min.js "> < / script >

    "< script type =" text/javascript"src="include/coin-slider.min.js "> < / script >

    < script type = "text/javascript" src = "include/bw - menu.js" > < / script >

    < link href = "include/ie6PNGFix.css" rel = "stylesheet" type = "text/css" / > "

    <! [end if] >->

    < / head >

    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////

    23-04-2012 14-32-40.jpg

    Where have I gone wrong? Thanks for the help

    All comments of IE around your css/js alternatives links are a little distorted... try it below:

  • Conditional statement advanced interaction checking if a variable is odd/even?

    Hello

    I was wondering if it is possible to have a conditional statement that checks if a variable is even or odd? I am using Captivate 5.

    Here's what I would do, and I know that I could do the same thing with the two sepaparate buttons, but I am curious to know if it is possible to do it with a button only.

    What I'm trying to do, is to give learners the ability to display some documents as a resource on their screen while they are listening for an example of an interaction with the customer. During this interaction some forms have to be filled, and I want learners to be able to display a before and after of the completed form, if they would like to see it.

    The easy way to build that according to me is to have a single button that would make the visible resource and the other button that hides the resource. I tried it and it works like a charm using standard measures.

    Since there are several resources that I want to put available for learners, with two buttons for each resource can clutter the slide a little, so I thought I'd try if I could create the same function using a button with a tip action.

    Whenever the learner clicks on the button for a resource, the variable associated with the resource is increased by 1. I would then have a conditional statement, saying: If the variable is odd-> see the resource, if the variable is same-> hide the resource.

    I can't find the option in the advanced actions to compare if a variable is even or odd. I can only find how to compare to a literal or another variable.

    Hello

    May I suggest another approach instead of odd/even?

    I would build a conditional action with 2 decisions. In the first decision, it of really a standard action (use IF 1 = 1, while it is still running), use this statement:

    Expression v_one = 1 - v_one

    v_one is the variable user for this button. It will always pass the value of this variable between 1 and 0. If the variable has no value assigned when set, first time user clicks it will get a value of 1, the second time the value 0.

    Second decision will be your cheque to condition:

    IF v_one = 1

    THEN hide resources

    ELSE to see the resource

    I hope you get the idea?

    Lilybiri

  • Start or stop the conditional statement

    I have an animation that plays from the beginning to the end. I would like to add a conditional statement that

    IF the animation is to play and click the ANIMATION BUTTON, it stops and goes back to the framework.

    OTHERWISE (if the animation is on frame one (did not play) it starts to play the end.)

    My script goes like this-

    animation_btn.addEventListener (MouseEvent.CLICK, startplaying);

    function startplaying (event: MouseEvent); {} void

    Play();

    Animation.Play ();

    }

    the animation is the name of the animation time line.

    Your help is very appreciated.

    assuming that the movieclip you wish to order is the animation:

    animation_btn.addEventListener (MouseEvent.CLICK, startplaying);

    function startplaying (event: MouseEvent); {} void

    {if(animation.currentFrame==1)}

    Animation.Play ();

    } else {}

    animation.gotoAndStop (1);

    }

    }

  • I want to hide a DIV element using the IE conditional statement. Is this possible?

    Hi all

    IE has trouble reading my video, I just want to insert a conditional statement saying Internet Explorer to hide the video. Is this possible and if so, how? Thank you very much in advance for any help.

    Here is the URL (http://austinlindsay.com/iplayers.html) and the code of the div if it's any help (I know it is a little rough, sorry!):

    < div id = "iplayers_demonstration" > iPlayers video demonstration
    < object classid = "' clsid:02BF25D5 - 8 c 17 - 4B 23 - BC80 - D3488ABDDC6B" codebase =" " http://www.Apple.com/qtactivex/qtplugin.cab "height ="431"width ="791"scale ="aspect"> "
    < param name = "src" value = "video/iplayers_demonstration.mp4" >
    < param name = 'type' value = "video/quicktime" height = "431" width = "791" scale = "aspect" >
    < embed src = "video/iplayers_demonstration.mp4" height = "432" width = "738" scale = "aspect" autoplay = "false" type = "video/quicktime" pluginspage =" " http://www.Apple.com/QuickTime/Download/ "> "
    < / object >
    < / div >

    If it is not possible, my only solution is to solve the following problem, so if anyone has any suggestions, please let me know. Thank you very much

    Problem:

    I joined several video on my site and their rescheduled so that they fit inside my container. It works fine in Firefox, Safari, and IE8, I'm told. But there is a serious problems with IE7, where videos that play are cropped. This is probably caused by when I have rescaled the video, and for some reason, IE not resized the real images, just the viewing area. It is also, does not recognize "autoplay ="false"because that videos play automatically when the page is loaded.

    But it does not appear when you test it in IE. No idea why?

    Because you have told IE to stay away!

    v_sql:=  'SELECT  /* * */ trans_id' || 
                'FROM            NDW_trans '||
                'WHERE           cable =TRIM(LEADING 0 FROM ' ||  i_Cab     || ')' || 
                                'AND ' ||  i_Pair  || 'BETWEEN low and highr' ||
                                'AND termsysid =' ||  i_termsysid ||
                                'AND provisionstatus= ' ||  3 /* find what the constant is for inservice*/ ;
                                
         IF     i_Bill IS NOT NULL THEN
                v_sql := v_sql || 'AND CO_Clli = i_Bill';
         END IF;                  
          BEGIN                  
               EXECUTE IMMEDIATE v_sql INTO o_trans_id_list; 
    How can I convert this to binding of variables that I also have a conditional statement which stretches from the place where clause

    Try this

    v_sql:=  'SELECT  /* * */ trans_id
                FROM            NDW_trans
                WHERE           cable =TRIM(LEADING 0 FROM :i_Cab
                                AND  :i_Pair BETWEEN low and highr
                                AND termsysid = :i_termsysid
                                AND provisionstatus=3 '  /* find what the constant is for inservice*/ ;
    
         IF     i_Bill IS NOT NULL THEN
                v_sql := v_sql || 'AND CO_Clli = :i_Bill';
         END IF;
          BEGIN
               EXECUTE IMMEDIATE v_sql INTO o_trans_id_list
               USING i_Cab, i_Pair, i_termsysid, i_Bill ;
    

    HTH
    SS

  • I'm trying to select several images (Forms), but I have not found a selection tool. This selection tool to transform the mouse cursor in an arrow and it is possible to select several images or figures. I use Microsoft Excel for Mac 2011 Version 14.5.3.

    I'm trying to select several images (Forms), but I have not found a selection tool. This selection tool to transform the mouse cursor in an arrow and it is possible to select several images or figures. I use Microsoft Excel for Mac 2011 Version 14.5.3. Thank you!

    tupensi wrote:

    use Microsoft Excel for Mac 2011 Version 14.5.3. Thank you!

    Then you should post on the Microsoft Mac forums where to hang out the gurus of the Office, as is the Microsoft product, with that you are having problems:

    http://answers.Microsoft.com/en-us/Mac

Maybe you are looking for

  • How to stop adware Add-ons to autodownloading and allow

    Lately, I noticed that in my modules I get advertising software that will download automatically on my list of Add-ons and then turn on itself. I've got adblock to the top, but these advertising modules seem to be able to get around that and even dou

  • Problem of Extension of RAM with Satellite Pro 6050

    Hello I bought 2 RAM sodimm 512 MB kingston KVR266X64SC25/512.When I insert one of them with is a sodimm RAM (128 MB), the departure of SP6050 without problem, and the bios shows the amount of Ram is 640 MB (the 2 Ram sodimm is ok) But when I insert

  • z ^ n-1 delay

    Please help me, I am struck here. On the attached photo, I circled a tool that is mentioned in my documents as a delay that "converted to integer value must evade from its own deferred value" I could not find this tool in labview, really, I spent a l

  • HP Officejet 6600: Cannot scan

    My printer works wirelessly and my scanner does not work, now it doesn't. It is said to ensure that the feature is enabled. How? It says software Open HP printer, select actions scanned, and then select Manage scan of the computer. I can't print to H

  • I want to cancel a download that downloads still go on the second day. It just says: get set up 1 second of estimated time

    I tried to cancel a download that happened on its second day, the only thing he said to me, it's the application in place has an estimated time of 1 second.