submit after calculation

I get a missing keyword error. Can you tell me what is the problem?
SELECT CASE
WHEN PLT_SHIP_UNIT = 'Cases Only'
THEN ((PLT_HIGH*CS_HT + 5)*1920)/1728
WHEN PLT_SHP_UNIT = 'Mastercases'
THEN ((PLT_HIGH*MC_HT+5)*1920)/1728
ELSE ((PLT_HIGH*SHPR_HT)+5)*1920)/1728
END
FROM DOC_PROD_SPECS;
--WHERE PROD_SPECS_ID = :P11_PROD_SPECS_ID;
Don't know if I should use the where either...

Alex,

You had many too close parens on the Else statement

SELECT CASE
          WHEN plt_ship_unit = 'Cases Only'
          THEN
             ( ( plt_high * cs_ht + 5 ) * 1920 ) / 1728
          WHEN plt_shp_unit = 'Mastercases'
          THEN
             ( ( plt_high * mc_ht + 5 ) * 1920 ) / 1728
          ELSE
             ( ( plt_high * shpr_ht ) + 5 * 1920 ) / 1728
       END
FROM   doc_prod_specs;

Jeff

Tags: Database

Similar Questions

  • Submit / run HTML on submit - after calculations and Validation

    Hello

    I use this code to send SMS, I want to run using PL/SQL process on submit - after calculations and Validation.
    http://xxxxxx.biz/api/api_http.php?
    username=xxxx&password=xxxx&senderid=SMSALERT&to=&P8_MOBILE.,&P8_MOBILE2.&
    text=&P8_TEXT.&type=text&datetime=2013-01-07%2010%3A48%3A53
    Is this possible? How?

    I use APEX 4.2 on Glassfish 3.1.2 listener 2.0, Oracle 11 g R2...

    Kind regards
    Fateh

    Hi Fateh,

    try to use the utl_http package to make a http request.
    For example:

    declare
      t_http_request   utl_http.req;
      t_http_response  utl_http.resp;
      t_text           varchar2(32767);
    begin
      --Setup your http request and get http response
      t_http_request  := utl_http.begin_request();
      t_http_response := utl_http.get_response(t_http_request);
    
      --Process the response
      begin
        loop
          utl_http.read_text(t_http_response, t_text, 32766);
          --do something with the response
        end loop;
      exception
        when utl_http.end_of_body
         then
           utl_http.end_response(t_http_response);
      end;
    exception
      when others
      then
         utl_http.end_response(t_http_response);
         raise;
    end;
    

    Also, make sure that you have configured the network ACL to perform the http request.
    Take a look at this page http://www.oracle-base.com/articles/11g/fine-grained-access-to-network-services-11gr1.php for info on this subject.

    Kind regards
    Erik-jan

  • Unexpected results after calculation

    Hello.

    I have 3 databases of production which have worked successfully until Thursday.

    FARM sales for the whole company per month.

    EB2. Sale of a specific division a week.

    EB3. Sale of a specific division and top ranges, per day.

    Thursday.

    The problem is that after calculation of EB3, the totals I see in the validation reports are incorrect when compared with the totals in the EB1.

    The whole story is the display of incorrect results, not only the data for the current month, which is that I charge per day.  I'm doing an incremental loading of the current and previous month only.

    I took a backup and loaded in the EB3 and performed the calculation... once again the totals were incorrect.

    Friday

    When I compare the validation reports, totals in EB3 were as expected when checking against the EB1.

    I did nothing for the outline, the backup is the same.

    EB1 and EB2 were ok.

    Saturday (today)

    When I see the validation report today I noticed that EB3 has the same behavior; incorrect results.

    And EB2 also contains unexpected values after calculation.

    Have you encountered this problem before?  Is there something specific I should review to determine and solve this problem?

    Log files reflect not any message "error" or "fail".

    Any comment is welcome.

    Kind regards

    JC

    Difficult to clarify the question without knowing what actually do the calculations. Just a suggesiton wild as you see error every day replacing when you see good results just make a backup of contour and then use the problematic day contour compare to compare 2 contours. May be there are some jobs that you are not aware of the evolution of the sketch, thus destabilizing the whole of the data!

  • After calculation of s does not as expected

    Hi all

    Can someone explain the result of the test below.
    Region 1:
    
      Item                   : P2_FLAG
      Source Used            : Always
      Source Type            : Static Assignment
      Source Value           : INITIAL
    
    Region 2:
    
      Contains a SQL Report that does "select deptno, dname from dept"
      
    Computation:
    
     Item Name        : P2_FLAG
     Type             : Static Assignment
     Computation Point: After Region(s)
     Computation      : CHANGED
     Conditions       : (none)
    When I run my P2_FLAG page displays the "INITIAL" value I expected to see "CHANGÉ" because I thought that the calculation must be updated once all parts are processed and before the page is sent to the browser. I couldn't find any documentation that tells exactly how calculations "after regions or" behave, but [this site | http://www.apexsolutions.de/blog/allgemein/interactive-report-without-initial-results/] suggests it should work the way I expected.

    I am doing something wrong, misunderstandings of computation points, or y at - it a bug?

    I use APEX 4.0.2.00.07.

    Thank you.

    Hello

    After calculation of the regions is executed after your item is rendered in the HTML document.
    It will only affect the value of the session state from the question, no value you can see in the HTML document

    Kind regards
    Jari

  • Show "hide / show region" after calculations

    Thank you in advance,

    I have a number of parts of the report "hide / show" on my page, and two reports are the research areas incorporated with them. What I'm hoping to do, is show a specific skin and region after calculations when it is clicked on the specific button for this area of research. I created a button with more appearing as its URL:

    JavaScript:doSubmit('GO'),hideShow('region3','shIMG3','/i/HTMLDB/Builder/rollup_plus_dgray.gif','/i/HTMLDB/Builder/rollup_minus_dgray.gif ');

    When the button is clicked, the page begins to update, then the region of h + s displays, but once the page finishes refreshing, the region closes upward. I wondered a better way to reload a page, then call the function hideShow? Thank you.

    Robert

    Published by: tread on April 28, 2009 08:16

    Hey

    Have you looked here?

    [http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#STICKY]

    See you soon

    Ben

  • Process of calculation to calculate the value after submit after all validations

    Hello

    Please help with a possible approach or suggestions for the calculation process.

    I have a calculation process after submit I want to calculate its value after that all validations are handled. Because this process of calculating trim is off of the first part of the input string of the user for the P3_USES element. Thus, for example consider; the user selects a value for P3_USES (point list manager) to be "TAC"... BCA... BCA... BCA... 0.CA BC... "CA IT BC. So my calculation process just stripes off the coast of the first portion of the string and computes the value will be "BCA"... BCA... BCA... 0.CA BC... "CA IT BC. It works fine when all postings on the page are placed without cooking.

    The problem occurs, then the validation fails on the form. Once the validation fails, the calculation process; already calculates the value and the P3_USES value form element is set to "BCA"... BCA... BCA... 0.CA BC... "CA IT BC. So, here the user solves the problem of validation and sends it again the form, but at this point the value is calculated again but this time that my string is "BCA"... BCA... BCA... 0.CA BC... CA IT BC"which is not correct, because my initial user string entry was"TAC"... BCA... BCA... BCA... 0.CA BC... "CA IT BC.

    So my question is how they treat the value of my calculation after all validations. While I can keep the original value of the P3_USES element. I'm using the version of Oracle APEX 4.0 and Oracle 10 g R2 database.

    Thank you

    Rambeau

    Hello

    Combine code of calculation and validation?

    Perform the calculations in the process?

    Use another element to contain the value 'real '?

    Kind regards

    Jari

  • How to clear the form submit after button preesed?

    Hi all

    I am new to the apex. I created a form based on the table. Whatever values I enter these values are inserted into this table. But after to insert the form is not allowed. Please give solution to clear the form in detail.

    Thank you and best regards,

    Rambeau

    You can clear the values of the element in the form of several ways,

    One of the ways is to create a process to clear items from the cache of the page after submit section,.

    Category: State of Session

    Type: clear the cache for all items on the page (PageID PageID, PageID)

    Enter the Pages to clear Cache: enter the page number you want to delete the value from the element (2)

    Another way is to create a branch to the same page and give the page number in the field "Empty the Cache".

    Thank you

    Lacombe

  • Submit after selecting the value of Popup LOV

    Anyone know if it is possible to make the Popup LOV behave as the list select and resubmit the page after selecting a value?

    The Select list has an additional attribute in properties named "Page Action times changed value". One of the options for this attribute is "submit Page". This attribute is not available for Popup LOV, but I would like to be able to create the same behavior. The number of values that might be returned for this article is too many to use a Select list...

    I think I might be able to add a bit of Javascript somewhere and do a "onChange.submit ()" or something like that, but I'm not sure of the syntax, or where to put it.

    Any help gratefully received...

    TIA,
    Eric

    Hello Eric,

    Create a "dynamic Action" that fires when the value of Popup LOV is changed and set the Action to "submit Page".

    Thank you
    Machaan

  • Disable the button "submit" after the presentation

    We have a form that we distributed to multiple users. The shape is defined so that presentations go to a predefined server location. The problem is that some users submit the form several times (don't know why). Maybe they do not notice the message that says 'submit form '. In any case, we want to disable the button send after submitting the form (even it is only for this "session"). I know that once the form is closed and reopened the button works again, and that's ok. If anyone has any suggestions I would be grateful. Thank you.

    Hello

    Modify the script above to:

    This.Access = "readOnly";

    your submit button will be set to read-only.

    Regards-

    Chalukya

  • Using the page submit after elements in the process of treatment page

    Hi all

    I have a form of DML in which the user can update a column.

    After clicking the Apply Changes button that I need to send an email saying the record has been updated with some page elements in the body of the email.

    I am able to send email, but I'm not able to display the page elements in the body.

    After changing the save the session state for the 'yes' also he did not.

    Y at - it another option that must be set so that I can use the page elements in the body of the email.

    Thank you

    MJ

    Make sure that after settlement it is normally a reset page call, is perhaps what kills the variables you are trying to access.  You should put your mail send processes PRIOR to the reset page process...

    Thank you

    Tony Miller
    Los Alamos, NM

  • Highlight a field after calculation

    I'm a novice at writing scripts and events so my question will sound stupid and can not use the proper terminology.  Please look beyond.

    Using Formcalc, I am multiplying a monetary value against an exchange rate to give a value in U.S. dollars.  See 'Calculation' below.

    I'm trying to use stocks of field to change the background/foreground colors when the result of this calculation is greater than a limit, in this case, 10 000.  Using the buttons action generates the script below (Format field see if calculated the result...).

    The problem is that the LCD will enter this code BEFORE the code for the calculation.  Because the area has not yet been calculated, errors do not highlight.

    I copied the code for the two components in Notepad, and I tried to move them so that they are in the right order (see part III below).  However, I get syntax errors.

    It is such a simple thing.  Can someone help me?

    Calculation *.

    Form1. Velocity_limits. #subform [0]. #subform [1]. USD_value_1::calculate - (FormCalc, client)

    USD_value_1 = Currency_value_1 * Exchange_rate;

    Field format if the calculated value exceeds the limit *.

    Form1. Velocity_limits. #subform [0]. #subform [1]. USD_value_1::exit - (JavaScript, client)

    + PRODUCT - CHANGE NOT (ID:45771E5A-579E-4330-8FAB-490B9927685A CRC:3835840347)

    + Type: Action

    + Result2: SetForecolor ("$Node1", "255, 0, 0")

    + Performance(1): SetFillColor ("$Node1", "255, 255, 153")

    + Node1: form1 [0]. Velocity_limits [0]. #subform [0]. #subform [1]. USD_value_1 [0]

    + Condition1: NumericField("$Node1","greaterThan","10000")

    + ActionName: USD_value_1.exit

    If {(this.resolveNode("$").rawValue > 10000)

    this.resolveNode("$").ui.oneOfChild.border.fill.color.value = "255, 255, 153;

    this.resolveNode("$").fontColor = "255, 0, 0;

    }

    //-

    In Notepad *.

    Form1. Velocity_limits. #subform [0]. #subform [1]. USD_value_1::calculate - (FormCalc, client)

    USD_value_1 = Currency_value_1 * Exchange_rate;

    Form1. Velocity_limits. #subform [0]. #subform [1]. USD_value_1::exit - (JavaScript, client)

    + PRODUCT - CHANGE NOT (ID:45771E5A-579E-4330-8FAB-490B9927685A CRC:3835840347)

    + Type: Action

    + Result2: SetForecolor ("$Node1", "255, 0, 0")

    + Performance(1): SetFillColor ("$Node1", "255, 255, 153")

    + Node1: form1 [0]. Velocity_limits [0]. #subform [0]. #subform [1]. USD_value_1 [0]

    + Condition1: NumericField("$Node1","greaterThan","10000")

    + ActionName: USD_value_1.exit

    If {(this.resolveNode("$").rawValue > 10000)

    this.resolveNode("$").ui.oneOfChild.border.fill.color.value = "255, 255, 153;

    this.resolveNode("$").fontColor = "255, 0, 0;

    }

    //-

    Hello

    You have the code formatting on the output of USD_value_1 event, but using an event calculate to assign a value does not fire the exit event.  You must add an action on the output of fields Currency_value_1 event, such as;

    If the Exchange_rate field can be entered through the form fill you so similar (to the output of Exchange_rate) action.

    Concerning

    Bruce

  • How to edit text on submit after inquiry screen Builder?

    I use apex.oracle.com, generator for a fact-finding investigation very simple. After that the participant survey click on send, he sees the standard display of thanks. I want to change the contents of this screen. How can I change the screen that appears after the participant has sent the survey?

    Thank you Ben, Tel. 650-924-2367

    Thanks for the quick response! Indeed, following your suggestion - creation of the investigation from scratch - I was able to set a Message of Introduction and a closing Message. But now I am unable to take advantage of pre-made questionnaires.

    But is not quite answer the question that is to modify the XML to an existing survey. A workaround can be this:

    1. export the xml file the survey
    2. change the xml file
    3. import the xml file, it creates a new poll for example AACK
    * 4. change the label to PERU (force overwrite) AACK * (see image at the http://v.gd/T7DBYH

    East - reliable? Would the public URL to the new change of PERU? He has been
    http://Apex.Oracle.com/pls/Apex/f?p=67351:Q::AAAV:
    would it still be the same?

    I want them to see the new wording without sending a new URL.

    Thank you

    Ben

  • After calculation of special formatting Simple

    I have a form field together that each requires a numbers, done some math and displays the results in a separate field.

    What I would like it to do is simply add all the entries (not a problem), but then take the result and change them as follows: If you can subtract 5 from the result and still get a positive real number, it also displays these number after him.

    For example:

    Entry 4

    W/formatting of output: + 4

    Entry: 8

    W/formatting of output: + 8 / + 3

    Entrance: 5, 3, 6, 7

    W/formatting of output: + 21 / + 16 / + 11 / + 6 / + 1

    I'm exhausted after a day of synchronization of the fields, if anyone could lob it on the plate for me, I would really appreciate.

    (Adobe Acrobat 9 Pro)

    You can use the following as the custom of the Total field Format script, but you owe me a six-pack.

    (function () {}

    do nothing if the field is empty

    If (! event.value) return;

    get the value of the field as a number

    var num = + event.value;

    var d = 5;          divider

    var s = "+" + num;  begin to build the output string

    var;             number of iterations

    determine the rest

    var r = num % d;

    If the memory is not less than the divisor.

    If (r! == num) {}

    determine the number of iterations

    He = (num - r) / d;

    implement the output string

    for (var i = 0; i)< it;="" i="" +="1)">

    s += « / + » + (num - (d * (i + 1))) ;

    }

    }

    display output string

    S = Event.Value;

    })();

    This code is based on the assumption that the entry is a positive integer. If you don't already apply on this or areas other than the value of this field is based on a script of hitting and validate, you should.

  • Disabling a button "submit" after the first click on a custom page

    Hi guys,.

    I have a requirement where I need to add a button "submit" ("email") to a custom page, once the button is clicked to send a notification by email, it should be disabled for the next time that the user not send the email for the second time.
    Adding a button is OK, turn it off

    Pls help me if anyone has ideas/thoughts.
    Appreciate your help.


    Thanks in advance,
    Suman

    Hello

    Your condition can not be filled with blockoneverySubmit API because it would block if it is between the transaction once the event is over, you can click on it again. Better at the event click redirect it to the same page and make this option off or use PPR (better solution).

    Kind regards
    Out Sharma

  • After calculation calculation nightmare

    Hi all

    I placed this code here for analysis because it is driving me crazy because it does not work and I do not understand why. It is a calculation of calculation of Post for an article on a page in my application. By operating that simply, it returns 0 even if the period and the date paid dates are fairly remote for the account to be late. The call to the function is the following:

    FX_LEVYPENALTY(:P7_TOTALEMPLOYEELEVY,:P7_EMPLOYERLEVYCONTRIB,:P7_PERIOD,:P7_DATEPAID);


    create or replace function "FX_LEVYPENALTY".
    (employee_levy in NUMBER,
    employer_levy number,
    the_period by DATE,
    the_date_paid in DATE)
    Return NUMBER
    is
    months_late NUMBER;
    penalty NUMBER: = 0;
    first_month_penalty NUMBER: = 0;
    t_hsdlfinesrate NUMBER;
    t_hsdlfinesadditional NUMBER;
    the_due_date DATE;
    total_levy NUMBER;
    Start
    -Fine flow rates and rate table
    Select HSDLFINESRATE, HSDLFINESADDITIONAL
    in t_hsdlfinesrate, t_hsdlfinesadditional
    of SSC3_RATES
    where RATESCHEDULEID = 1;

    -Calculate the expiry date
    the_due_date: = add_months(the_period,2);

    -If it is paid or paid date field is empty
    If (the_date_paid < = the_due_date) AND the_date_paid IS NOT NULL then
    penalty: = 0;
    RETURN penalty;
    on the other
    months_late: = (current_date - the_due_date);
    total_levy: = employer_levy + employee_levy;
    -first month rate is different for the other months
    first_month_penalty: = total_levy * (t_hsdlfinesrate/100);

    -Calculate the other months of delay and fines owed
    months_late: = months_late - 1;
    all in months_late! = 0
    loop
    penalty: penalty = + (total_levy * (t_hsdlfinesadditional/100));
    months_late: = months_late - 1;
    end loop;

    penalty: = penalty + first_month_penalty;
    RETURN penalty;
    end if;

    end;


    Any ideas why would be extremely welcomed.

    Thank you

    Glenroy

    Hello

    Change
    all in months_late! = 0 loop
    TO
    loop 0 > months_late
    in order to avoid a loop infinite possble.

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

Maybe you are looking for