Negative, positive value check

I have a slider and

My requirement would be, if the amount that is negative (for example,-8) type = 9 aligns the correspondent ve (e.g., 8) amount of type 10, we create a record type = 10 with + ve quantity in the product table

declare
cursor cur_find is
Select p.qty, p.id, p.group, p.loc, x.catog
product P, Prodline Pr
where and p.type = 9 and p.qty < 0 and Pr.id = p.id and p.qty in (select (-qty) of the product where type = 10);

Start
for x in cur_find loop
insert into values of product (x.id x.group,-x.qty, 10, x.catog); -He has only five columns and four first fields combined to create the primary key
end loop;
commit;
end

I doubt that this part (select (-qty) of the product where type = 10) will get the reqd result. ? pls help me, y at - it not best way to implement

Please confirm if this is correct or helpful to me to analyze to code better. :)

Tags: Database

Similar Questions

  • Help compare the negative and positive values

    Well guys, I do this example to show you what I mean

    With this example, I can get positive and negative numbers in digital

    But for me, the 'negative' mean nothing

    Example:

    If I have "100-200" for me the biggest value is - 200

    But if I compare the values of bouth got 100 as greater value

    I do the same calc for 3 different variables such as A, B, C

    and after that I need to calc whose value is 'more '.

    But my problem is that if I have the values "-350 300-400.

    the largest will be "300", but for me the 'negative' mean nothing

    so I need to the largest value is "-400".

    For all positive values, its works very well!

    I compare A and B, after the highest is on C and have a result!

    but when I have negative and positive values... I had this problem...

    and when I have negative values only I have a problem too.

    '-300-400-500' for me the largest value must be "-500" but labview-watch "300".

    as - 300 is greater than-500 in algebriac.

    And if I use absolute values, I will always have a positive value... but I need to know if the value is positive or negative

    No matter which, can help me with this?

    Thank you

    Ben

  • extract the positive values of a 2D array

    Hello

    I have a table 2D with positive value in column 2.

    What I want to do is to find the positive value of each column.

    For example, I have this table

    A        B

    -1        1

    2         -2

    3         9

    5         4

    -5        6

    6         7

    and I want to get the following

    A          B

    3          9

    5          4

    6          7

    I managed to have the positve in each case, but the value do not match (I have all the positive values of each column) as

    A AND B

    2 1
    3 9
    5 4
    6 6
    7

    can you help me please?

    Just to be clear: you want the output array to contain all rows in the input table that have positive values in the two column A and column B?  Are you using strictly positive (> 0) comparisons or not negative (> = 0)?  Are integers of values?

    RIF answers: Yes and strictly positive, this will do what you want.

    Lynn

  • Makes a negative positive field entry

    I have created a form for transfer of funds from the account a budget to another. Thus, the person between the account numbers and amounts for increase/decrease each to move effectively dollars.

    How to make the display column decrease as one number negative to two decimal places in parentheses - example (200.00) even if it is entered as a positive number - 200.00 for example?

    Probably the easiest way is to convert all the positive values for negatives and set up field format so that negative numbers to display you want. You can use a custom validation script to do this:

    If event.value (+ event.value > 0) = - event.value;

  • display a positive value in a form

    I had a table tblshipping who got two col called as send_qty, received_qty where I calculate the amount.

    the thing is a few times in the calculation, I get a negative and positive moments, I always want the positive value should appear to the end user

    SQL > select sum (send_qty) - sum (received_qty) from tblshiping where matid = '1';
    I'll say something (-5)
    fom I want to show this-(5) (5). ghoulish any1 help me how it is possible...

    I know to change the order in the query, it can be done, but once again for a State, it will show negative value which I did not see it

    Use ABS

    SELECT ABS(SUM(SEND_QTY)-SUM(RECEIVED_QTY)) ...
    
  • How to display a positive value with a thinner sign

    I want to display a positive value with a thinner sign and a negative value with a less fine sign. How can I do? Is there any character in the custom format for this? I don't want to convert number to text and use the case statement because I need to two decimal and thousands separator.

    OK, try this...

    You will need to do a "UNION ALL" of three queries, one for positive values, one for the values zero and one for negative values.

    In the query "negative", follow these steps:

    (1) add a filter on the measure of value 'less than 0.
    (This will ensure that all values are negative).

    (2) in the tab Format data, select "Custom" and type #, # 0.00 -
    (This will add the end negative sign.)

    (3) in the tab change the formula, add the function absolute value ABS (able to insert here)
    (This will get rid of the default signing negative.)

    For the query "positive values", change the above as follows:

    (1) change the filter to "0".
    (2) in the format of data, change the custom format #, # 0.00 +.
    Step 3 is unnecessary since all values are positive.

    For the query "values null ', just add a filter 'equal to zero.'

  • How to format negative monetary values (remove ())?

    Hi, I have a field that can occasionally contain negative gross values.

    What happens is, when a negative gross value is powered by the field, the field of looks like this:

    ($999.999,00)

    And I would like that it looks like this:

    -$999.999,0

    Any ideas how to do this?, I couldn't find any option in the templates section.

    Thank you!.

    Well, I fixed it deleting the {num.currency} formatted, and I replaced it for num {$zzz, zzz, zzz, zzz, zzz, zz9.99}

    It seems that the () enclosing the number produced negative signs to disappear.

  • Limit a number to a positive value

    Is there a way to limit a numeric positive value?

    For example; a b = c where both a and b must be positive and c numbers cannot be less than 0.

    K

    Hello

    The script seems ok. I used Javascript as well in the script editor, make sure that you have the language dropdown choose JavaScript and FormCalc.

    Niall

  • convert oracle.jbo.domain.number of positive value to a negative value in EL Expression

    Hi all

    jdev: 11.1.1.4

    My use case is to try to convert positive user input negative number, once the user presses the tab key

    I use the Employee in the HR schema table and when any kind of user + ve value in the salary column, then be converted into value - EV.

    < af:inputText value = "#{bindings." Salary.inputValue.value > 0? 0 - links. Salary.inputValue.value: links. Salary.inputValue}.

    label = "#{bindings." Salary.hints.label}.

    autoSubmit = "true" >

    < af:convertNumber type = "currency".

    currencySymbol = "$" integerOnly = "true".

    minFractionDigits = '0' maxFractionDigits = "0".

    groupingUsed = 'false' local = "en-US" / >

    < / af:inputText >

    It's work the converted number in ve - but it makes the readonly entry text box. If the user was not able to change the value.

    Kind regards

    Krishan

    I don't think it can be done in EL only. the problem is that you change the location of storage. I suggest that you use a value valueChangeListener and climatiqueLes in there as

    {} public void numberChangeListener (ValueChangeEvent valueChangeEvent)

    Integer i = valueChangeEvent.getNewValue ((Integer));

    If (i > 0) {}

    get the link container

    BindingContainer links is BindingContext.getCurrent () .getCurrentBindingsEntry ();.

    updates to process

    FacesContext will involve = FacesContext.getCurrentInstance ();

    valueChangeEvent.getComponent () .processUpdates (contxt);

    get a definitions page ADF ADF attributevalue

    AttributeBinding attr = (AttributeBinding) bindings.getControlBinding ("Salary").

    attr.setInputValue(i*-1);

    PPR refresh a component jsf

    AdfFacesContext.getCurrentInstance () .addPartialTarget (valueChangeEvent.getComponent ());

    }

    Timo

  • Why change the Illustrator in the size and position values?

    HY all!

    Illustrator 5.5 always change my input values of size or position.
    (For example: I type 10mm, press enter and 10 changed in 10, 231mm.)

    I checked again and again, but I don't have any snap function activated.

    I have Illustrator CS6 too, which works very well (but much more slowly).

    Checked all my affecting about 5 times, still not found the solution...

    Thank you very much for your advice!

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

    (MBP 17 ", C2D 2, 5 GHz, 4 GB RAM, Mac OS X 10.6.8.)

    "Snap to grid of pixels" turned on?

  • AP check printing: position the check at the bottom of the page

    Hi all

    I'm fighting to build a model RTF for AP check printing.

    I tried Tim solution and approach of Darshan and can control the number of invoices per page to successfully manage overflow controls.

    The problem is on the control of the position of the control that needs to be printed at the bottom of each page (CANCELLED or DO NOT INVALID) absolute
    According to the number of invoices per page, the table that contains the Bills push down (or pulled up) the audit as well as the value of MICR.

    Since the last audit XMLP impression is quite common requirement, there may be a formula for success there.

    Enjoy an advisor for that matter.

    Thank you

    Technically, this should be in a new thread of its own.

    Have you tried to do a table of 8 cells, where each cell contains a digit of the date string?

    This model of layout:

    Check Date: 
    table, row 1, col 1: 
    table, row 1, col 2: 
    table, row 1, col 3: 
    table, row 1, col 4: 
    table, row 1, col 5: 
    table, row 1, col 6: 
    table, row 1, col 7: 
    table, row 1, col 8: 
    

    results in this output:

    Check Date: 20100908
      2  0  1  0  0  9  0  8
    
  • Get the positive values of sql

    I have the balance column and I need to choose only positive of the sql query values.

    Balance
    200
    -20
    -220
    100

    EXPECTED
    Balance
    200
    100

    Like this??

    SELECT SUM (balance)
      FROM (SELECT total (KEY, program) balance
              FROM your_table
             WHERE total (KEY, program) > 0)
    
  • standard value check box problem

    Hei!

    I have a problem with a form created in lifecycle Designer 8.2 (on win7):

    The form yes/no has several boxes. I want the checkboxes to be turned off when the form is opened.

    In the object tab, I can choose the standard value. On some boxes, it works very well - on the last two is not.

    I copied and renamed the work but that did not help.

    Does anyone have a tip for me where to look for a solution?

    You can see the form here:

    https://Acrobat.com/app.html#d=SkIFUF4gRvOyFiYHEzBkdw

    Greetings from Vienna/Austria!

    Peter Strubreiter

    Hi ßeta,.

    The issue is that these two sets of boxes that both the default value is "off". Because of the overall liaison and the inverse values, it was forcing a tick in "nein".

    The other boxes are a hack, because you have disabled by default. You need to edit the XML Source to disable by default. It works, but I wouldn't recommend it.

    Here's the form returned with the two check boxes work, but I highly recommend the option buttons.

    https://Acrobat.com/#d=ifdyhi3ZUr-AUZO * TfNnhw

    As you have seen, you can set the option buttons to look square, which should be complete workflow of hand.

    You can have the script in radio buttons to allow users to deselect a choice. Take a look at this example. You need the script in the mouseDown and mouseUp the option button events. You don't need the rest of the script:

    http://www.assuredynamics.com/index.php/category/portfolio/changing-the-visual-appearance-de boxes-radio-keys.

    Hope that helps,

    Niall

    Ensure the dynamics

  • New function to return 0 for negative design value

    How can I find the value 0 when calculating in the cell is zero or less than zero?

    calculation what ever is in the cell must be 'put' inside a max function like that.

    is that the calc is designated

    Then, you need to change:

    =

    TO

    = max (, 0)

    for example if the cell contains:

    = Sum(a2:B45)

    You must use:

    = max (sum(A2:B45), 0)

  • HP 7640: Negative-positive Conversion

    Hello!  Can I use my HP7640 to convert negatives possitive images and print them?  If so, what are the steps.  Thank you.

    No, you cannot scan negatives on these all-in-one. To scan negatives, the scanner must have the special adapter, as well as the right sensor technology. You must get a scanner/AiO which is designed for scanning of negatives. Or get reprints of first from negatives.

Maybe you are looking for

  • Display after the Nvidia update problem

    After you have installed the most recent driver (ver. 340.52) for my graphics (Nvidia GeForce GT 625) thanks to the HP Support Assistant, my screen has been changed. Everything has a blue/grey tint - it's like the red and green color no longer exist!

  • question about ".tin file extension.

    I noticed a file ending with the extension "." TIN"in a temporary files folder.  I do not know what program will open this file or how to find out what this file is or how and why it was created.  Someone has an idea?  I noticed there are websites th

  • How do I join an outgoing email large photo files

    I opened a new outgoing e-mail.  I used the app 'attach large files '.  I chose all my photos and had a list of 43 MB size.  The 'attach large files' says I can have a file size of 100 MB.  Now what?  The list is not forward the e-mail.  Neither the

  • long shortcut names

    I want to give long names (50 characters or more) for shortcuts to files & folders, but I am unable to do so at the present time. How can I do so? Its extreme urgency, just reply to the beginning

  • Import of Illustrator files to animate flash/cc

    I'm involved creating a Tablet app using cc Animate/Flash. I will be creating graphics in Illustrator.Could all sages members give me some info on:What size I should create my graphics. Should I create just to the rectangular ratio of tablets.Illustr