How to break the if condition

Hi guy,
I wrote a "pr_suppalloc_rules" procedure, this procedure I called sub procedure 'pr_suppalloc '.
In the procedure '(pv_mro_no, pv_status) pr_suppalloc' I pass the two parameter. pv_mro_no is in parameter.
pv_status output parameter and it is illustrated the procedure success or failure. If this is faliure, I get code sqlerror.

create or replace procedure (pv_mro_no in varchar2, pv_type in varchar2, pv_status out varchar2)
is
Start
pr_suppalloc (pv_mro_no, pv_status);

If pv_status is not null then
Rollback;
Dbms_output.put_line (pv_status);
*--> How come out of this if condition.
end if;

pr_suppalloc_rule1 (pv_mro_no, pv_status);

end;
*-> From this moment, I get out of this proceudre.
I used OUT there but can't access the PL/SQL.
Could you help me.

Thanks in advance.

User1512 wrote:
If the proceudre (pr_suppalloc) is successful then it will go to the next procedure if not he will be out.

If you really want to stop the execution of this procedure within the FI... END IF; block, you can use the RETURN; statement...

create or replace procedure ( pv_mro_no in varchar2,pv_type in varchar2,pv_status out varchar2) is
begin
  pr_suppalloc (pv_mro_no,pv_status);

  if pv_status is not null then
    rollback;
    DBMS_OUTPUT.put_line (pv_status);
    --> How to exit this if condition.
    RETURN;
  end if;

  pr_suppalloc_rule1 (pv_mro_no,pv_status);
end;

Although you can find better coding practice to implement exceptions defined by the user and use a STIMULUS; instead...

create or replace procedure ( pv_mro_no in varchar2,pv_type in varchar2,pv_status out varchar2) is
  ex_null_status exception;
begin
  pr_suppalloc (pv_mro_no,pv_status);

  if pv_status is not null then
    RAISE ex_null_status;
  end if;

  pr_suppalloc_rule1 (pv_mro_no,pv_status);
exception
  when ex_null_status then
    rollback;
    DBMS_OUTPUT.put_line (pv_status);
end;

Tags: Database

Similar Questions

  • How to accept the General conditions

    Can how I accept terms and conditions? My iPad and my phone ask me ' apple media services terms and conditions have changed.

    before proceeding, you must read and agree to the new terms and conditions

    ccancel/ok

    then nothing

    Hey lindafromnewark,

    I ran into something like this before, and usually a reset will solve the issue.

    You can watch notrestart your iPhone, iPad or iPod touch to see how to reboot your device.

    I'm sure that this will solve your problem.

    See you soon.

  • How to break the body in Email

    Hello

    How chain jump in before EMAI, to break the body of the email I use < BR > but is not line break in the body of the email
    DECLARE
    
    l_id number;
    to_add varchar2(1000):=:P19_TO; 
    from_add varchar2(1000);
    l_body varchar2(4000):=:P19_DESCRIPTION;
    l_sub varchar2(1000):=:P19_SUBJECT;
    I_case varchar2(10):=:P19_CASE_ID;
    I_isue_dte  date:=:P19_SUBMITTED_ON;
    
    
    BEGIN
    
       select email_id into from_add from user_mas where user_id=:app_user;
    
       l_id:=APEX_MAIL.SEND(
            p_to        => to_add, -- change to your email address
            p_from      => from_add,
            p_body      => l_sub||'<br>'||
                           I_isue_dte||'<br>'||
                           I_case||'<br>'||
                           l_body,
            P_subj      => l_sub);
      
             
      COMMIT;
    apex_mail.push_queue(
    P_SMTP_HOSTNAME => '192.168.0.6',
    P_SMTP_PORTNO => 25);
    commit; 
    
    END;
    How can I break the body of the email of new line.


    Thank you

    Ed

    Published by: Sophie on May 23, 2011 04:56

    You might want to try to change the

     

    for a

    chr(10)||chr(13)
    

    If you send a carriage return and a line feed.

  • Re: Satellite A300 - how to restore the original condition?

    Hello

    My computer freezes for a second or 2 from time to time and Toshiba support told me it might be a software problem. I don't think, because he began the day I bought the laptop and the display driver keeps on the work stoppage, but because I said that if it's a software problem.
    I would have to pay for it, I want to try everything before sending it for repair. This is why I would like to restore my Satellite in its original state as he was just at the moment where I bought it.

    So basically I have 2 questions:

    1 - does anyone have any idea why it keeps freezing on me? And what I should try to do to fix it?
    2. can someone tell me how to restore the laptop to its original state?

    Thank you very much Dina

    Hello

    To determine if it of a software problem or not, you need to restore the factory setting and if it doesn't work you can go to an authorized service provider. They can repair the laptop for you.

    The factory settings can be restored with the Toshiba recovery disc. I guess that your laptop has been delivered with Windows Vista, if you have options to restore factory settings: the Toshiba disk recovery or HARD drive recovery service.

    HARD drive recovery function formats the first partition of your laptop and install Vista again with all the drivers and tools of Toshiba. It is an image that is stored on the second partition of HARD drive in the folder HDDRecovery.
    If you go into the advanced with F8 boot menu after you start the computer, you can start this feature of Toshiba. And then select Repair my computer and some Windows files will be loaded. Then, you can choose the function to drive HARD Toshiba Recovery and follow the instructions on the screen.

    The Toshiba Recovery disk, you must create first, or have you done this yet? Normally, you get a reminder of recovery message after the first start of the laptop that you must burn this disc. Therefore, you must the preinstalled Toshiba recovery disc creator and the image in the folder in HARD drive recovery will be burned on the disc. Then you have a startup disk that can restore the factory settings and HARD whole disc formats then back up your data first!
    The recovery disk is necessary if you have a new HDD or Windows start doesn t. Otherwise, you can use HARD drive recovery.

    I hope I could help a bit and now you understand how to restore the factory settings.
    If you have any other questions, please let us know! :)

    Good bye

  • How to break the two folders that are cross-linked?

    I tried to move C:\users\richard to E:\My Documents ' My Documents'.

    Some how the two directories have become reticulate.

    Make any change in directory caused the same change in the directories of the sentence.

    How to restore the two inventories back to normal?

    I tried to move the directory in E:\ back to C:\, but received a parsing error.

    TIA,

    Richard

    Wednesday, February 5, 2014, 17:20:47 + 0000, Richard332 wrote:

    I tried to move C:\users\richard to E:\My Documents ' My Documents'.

    Some how the two directories have become reticulate.

    Make any change in directory caused the same change in the directories of the sentence.

    How to restore the two inventories back to normal?

    I tried to move the directory in E:\ back to C:\, but received a parsing error.

    The directory c: is not really a directory; It is a library which is
    just a pointer to the real directory on E:, a bit like a shortcut.

    So if you get there via the library or the directory, you are in
    in the same place - E:\My Documents and any changes there are also
    See in the library.

  • How to use the Group condition in the ODI mappings

    Hi Experts,

    I have a requirement in the customization of BI applications. Can you please someone explain how to use the LISTAGG function in odi mapping.

    I applied the LISTAGGR function at the level of mapping odi, but I get error below.

    Mapping of ODI: ColumnName: ENAME Expression: LISTAGG (EMP. ENAME, ",") THE GROUP (RANKING BY EMP. ENAME)

    Error:

    ODI-1240: Flow LIST_AGG_FUN_USAGE fails during an operation of integration. This flow of charge table target EMP_BI.

    ODI-1228: task failed LIST_AGG_FUN_USAGE (integration) on the scott_db of ORACLE target connection.

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00937: not a function of simple-group


    Oracle query:

    If I used this sql query in the database the correct result is.

    SELECT DEPTNO, LISTAGG (ENAME, ',') WITHIN THE EMP EMP (ENAME CONTROL) GROUP. DEPTNO;

    Output:

    10CLARK, KING, MILLER
    20ADAMS, FORD, JONES, SCOTT, SMITH
    30ALLEN, JAMES, MARTIN, BLAKE, TURNER, WARD


    Please give your valid solutions, thanks in advance.

    Kind regards

    REDA

    If you try in #ODI12C then in the set of properties, you can select the column which should be used to group by.

    If it's 11g so its bit complicated. Simply replace the mapping with below codes.

    LISTAGG (EMP. ENAME, ",") WITHIN GROUP (ORDER BY ENAME) / * sum() * /.

    Magic!

    Thank you

    Chantal

  • How to break the load XMl

    Hi all
    I have a requirement where I have to break the message entering into parts, where each part will be sent to the JMS queue as a single message.

    For ex:

    I currently get following output as a service
    < ns1:ABCdataCollection >
    < ns1:ABCdata >
    < ns1:JobId > 8786 < / ns1:JobId >
    daliya < ns1:Message > < / ns1:Message >
    < / ns1:ABCdata >
    < ns1:ABCdata >
    < ns1:JobId > 8787 < / ns1:JobId >
    bath < ns1:Message > < / ns1:Message >
    < / ns1:ABCdata >
    < ns1:ABCdata >
    < ns1:JobId > 8788 < / ns1:JobId >
    Castillo < ns1:Message > < / ns1:Message >
    < / ns1:ABCdata >
    < ns1:ABCdata >
    < ns1:JobId > 8789 < / ns1:JobId >
    Delahaye < ns1:Message > < / ns1:Message >
    < / ns1:ABCdata >
    < ns1:ABCdata >
    < ns1:JobId > 8790 < / ns1:JobId >
    eeeeeee < ns1:Message > < / ns1:Message >
    < / ns1:ABCdata >
    < / ns1:ABCCollection >

    and now I must break this message in a way that
    ******************
    < ns1:ABCdataCollection >
    < ns1:ABCdata >
    < ns1:JobId > 8786 < / ns1:JobId >
    daliya < ns1:Message > < / ns1:Message >
    < / ns1:ABCdata >
    < / ns1:ABCdataCollection > will be sent as a message in the JMS queue 1 and
    ******************
    < ns1:ABCdataCollection >
    < ns1:ABCdata >
    < ns1:JobId > 8787 < / ns1:JobId >
    bbbbbbb < ns1:Message > < / ns1:Message >
    < / ns1:ABCdata >
    < / ns1:ABCdataCollection > will be sent as message 2 and he followed. Can you guys let me know, what kind of processing I can use here?


    Thank you

    And that you pass as the input... I'm guessing that you spend the entire load as input...
    If Yes, then you will always get the first element...
    you have two options here...

    (1) your you change the entry of transformation so that it accepts that the entrance is the only unit of

    8786
    Sandrine

    and the GET the desired output
    .. u must send the entry under tns:getReportMetadataResponse/back/ns0:ReportMetadataCollection / ns0:ReportMetadata / ns0:ABCData [$CounterVariable]

    (2) change the transformation to accept a number as an input parameter and then your transformation should look like:-pass the $Counter also as input variable...











    Published by: 988445 on March 26, 2013 19:55

  • PIX: How to break the long console output?

    Hello!

    How can I break up of long on the (v.6.3) PIX Firewall console output?

    Thank you.

    Type "sho run" (or "sho conf"). At a command prompt, press 'Q', this will take you to the command prompt.

  • How to put the OR condition in IdXML

    I wanted to find all the users who meet the search criteria th "FirstName = John OR FirstName is Sally." How can I do it in IdXML OAM?

    By default, IdXML put 'AND' condition if more than one search parameter is provided. Is it possible to put an OR condition between IdXML search setting?

    Thank you!
    Kabi

    Hi k,

    In the oblixappparams.xml of the server identity file, there is a searchSameAttrAsOr parameter which can be set to true. Does research using the same attribute (as in your example with name) OR rather research AND research, but the research on different attributes remain ANDS. This works for the UI, and I guess that's the same thing for IDXML, although I have not tried it myself.

    Kind regards
    Colin

  • How to break the line in Oracle SQL?

    Hi all

    I have a long text with the value separated by commas. I'm storing this in a single table custom as it is. But I want that store with the next line, I mean split the comma separated line and insert in the table with the following line table or the character of new line.

    For example: my long text is A, B, C, D, E, F

    I need to insert as below in the table.
    A
    B
    C
    D
    E
    F

    Hello

    Can't you just use REPLACE to change all commas in the line breaks?

    INSERT INTO table_b
    (       txt
    ,      ...
    )
    SELECT  REPLACE ( txt
                    , ','
                    , CHR (10)   -- or whatever it is on your system
                    )
    ,       ...
    FROM    table_a;
    
  • Update of fake message 41.0.1 telling me to go and get an update, but when I do, I congratulated because I'm already up to date! How to break the Catch22?

    I get a message telling me that there is an available at 41.0.1 security/stability update, but I have to go and get manually because I (my computer) is allowed to be updated... However when I followed the link to the page of Mozilla, I get a happiness as having a Firefox update! -Catch 22 - keep coming back despite the reboots and restarts... grrrr!

    Sorry about that. I have updated the link to the GB version:
    https://download.Mozilla.org/?product=Firefox-41.0.2-SSL & os = OSX & lang = en-GB

  • How to define the initial Conditions of transfer function

    Hello

    I need set the initial of my transfer function value so that it starts to 0.7778 instead of from 0.

    [My transfer function is 1 / (3.3 s + 1)]

    I found this link, but still he somehow does not give the right output I desired because it has not started to 0.7778.

    http://digital.NI.com/public.nsf/allkb/0D8F3397666F295F8625773B0055F1B9

    Could someone help me with this issue?

    Farid Ali

    Ridwan,

    Since you have a SISO system, you can try using the screw "Design Control" to convert the transfer function after normalization of State-Space model, you can use a function 'hidden' in the design of control that are used to calculate the original terms of your system. This function will calculate the necessary value to States in order to obtain the desired result, based on the model. If your initial release is zero, the Conversion.vi cd_IC will give you an empty model and to avoid an error, then change its value to zero.

    As an attachment, you have an example and a screw that you allow to use it in 2009 LV.

  • How to avoid the race condition critical in the event loop?

    I'm having a problem of race in the structures of the event.  I looked through various discussions of the forum and have not been able to track down a solution.

    In the attached vi (labView2015), if you type a new number for 'X', are not press entry, and hit then the "Go" button, then the old value of 'X' is used in the case of structure.  I deduce that it is a problem of race where after clicking on the 'Go' button has undertaken a task in the structrue event and also set up something in the queue to actually update the value of the variable.  Sounds good?

    This is the simplest example I could do for this problem that has emerged in vi a lot larger and more complex.  Any help is appreciated.

    With our thanks!  Devon

    MarcDub wrote:

    In fact, in addition to require a loop around the structure of your event, you must configure your events to the button GO to "Change the value" instead of "Mouse down".

    I should have mentioned, but I put my business in my excerpt to change value.

  • How to display the result conditioned by the sign!

    Hello

    This sum: sum (B.MONETARY_AMOUNT_03 [... / B.ACCOUNT_TYPE = 'R' and... / B.TREE_NODE = 'FUNC']).
    sum (B.MONETARY_AMOUNT_03 [.. B.ACCOUNT_TYPE = ' and... / B.TREE_NODE = 'FUNC'])

    is well calculated. (in my example, it is equal to: 5457573)

    Now, I want to show this result only if it is positive, so I write this syntax...

    <? If: (sum (B.MONETARY_AMOUNT_03 [... / B.ACCOUNT_TYPE = 'R' and... / B.TREE_NODE = 'FUNC'])-)
    sum (B.MONETARY_AMOUNT_03 [.. B.ACCOUNT_TYPE = ' and... / B.TREE_NODE = 'FUNC'])) > 0? >

    For me, that will show the result if it is positive, but when excuting, which show nothing... Normally, it should show the 5457573
    ..

    Any help please!

    You should do this:


    sum (B.MONETARY_AMOUNT_03 [.. B.ACCOUNT_TYPE = ' and... / B.TREE_NODE = 'FUNC'])) > 0? >

    sum (B.MONETARY_AMOUNT_03 [.. B.ACCOUNT_TYPE = ' and... / B.TREE_NODE = 'FUNC']))? >

    Thank you!

  • How to use the search otherwise condition as

    Oracle 9i

    Hi all

    I work in the management of control here, we have a table named as OE_ORDER_LINES_ALL and the name of the column called UPI, and its length is 16 tank.

    Now the customer has the UPI with 13 tank and now, I need to check if all the IPUS are in the table.
    I have almost 600 of the UPI and I can't able to use as an operator. Y at - it one option other than as an operator.

    For example

    Resemble UPI this 050 009714373007G, but the customer gave this G 009714373007.

    Is there a UPI then I would use like this

    "Select upi in oe_order_lines_all where the upi as ' 009714373007 G %.

    If there is more than 2 UPIs how to use the search condition

    Any help is highly appricatable

    Thanks and greetings
    Srikkanth.M

    If you know that you will benefit from a number of values of UPI 13 characters and you should look for if there are rows in the table that match the 13 first characters

    select upi
      from oe_order_lines_all
     where substr(upi,1,13) IN( '009714373007G', <> )
    

    Justin

Maybe you are looking for