No negative number

Hi can anyone help how to write a SQL/PLSQL code when an negative number insert a error message should appear??
ekas

If this is an APEX item, you should be able to go in to the APEX page and add a validation. You can choose to do an item-level validation-- if you choose to do a function returning error text, you'd just need something like
IF( :your_apex_item < 0 )
THEN
  RETURN 'There was an error.  This item must be greater than or equal to 0';
ELSE
  RETURN null;
END IF;Of course, you can tailor the message to make it more meaningful.
Note as well that there is a separate forum for APEX-specific questions-- if you post over there, people will assume that you're asking about APEX not about server-side PL/SQL.
Justin

Similar Messages

  • How to find Negative number

    can any one pls tell me how to find negative number ?
    Thanks

    1. One easy method is to look for the giveaway dash in front of the number, e.g. "-1" is a negative number, given the "-" instead of the "1."
    2. Negative numbers can also sneakily be found by multiplying i by itself: i^2^ is a negative number.
    3. Negative numbers can hide in the exponent of e as complex numbers. e.g. e^i*pi^ is a negative number.
    4. If we're referring to Java here, perhaps the following could be of some use:
    final int ZERO = 0;
    public static void main(String[] args) {
    int a = 3;
    int b = -13;
    System.out.println(a + " is negative? " + lessThanZero(a));
    System.out.println(b + " is negative? " + lessThanZero(b));
    boolean lessThanZero(int n) {
    return n < 0;
    }

  • PO_QTY came out with 0 and negative number

    Hi experts,
    I was loading data via 2LIS_02_SCL,2LIS_02_ITM. PO_QTY was populated by ABAP instance. But some PO_QTY number came out with zero and negative number while some of other PO_QTY number came out with the right number.
    I was working on this problem for 2 days but have no idea on it. Anybody can help me?
    Thanks a lot.
    Junbo

    dear Junbo,
    are you working with business content extractor only, i mean no enhancement to that field ? i think it can be 'program error' that po quantity is not correct, try to search oss note ? what's your r/3 PI level ? applied the oss note mentioned before working with lo-mm pur ? it's stated in mm pur extraction doc (if you have not this doc, let's know your email, will send you).
    if you are using business content extractor only without enhancement to this field, you may create oss message to get sap help. debug with rsa3 option debug marked is possible.
    hope this helps.

  • Problem to display a negative number in XML Publisher output in excel

    Hi All,
    I am facing problem in displaying a negative number in XML Publisher output in excel.
    My requirement is that I have to display a negative number in brackets when the output is taken in excel format. Eg: If the value is -123 then i have to display it as (123).
    I have put these brackets using a formula column in the RDF, but it is the default functionality of excel that whenever there is a number in brackets then it automatically displays that as a negative value.
    Can anyone please help me how I can display this negative number within brackets and not as a negative digit. Is there any special tag or is there any formula which can be used to convert this into text and written in the Help text of RTF template.
    This is very urgent. If someone knows please reply asap.
    Regards,
    Shruti

    This is very urgent. If someone knows please reply asap.We are all volunteers here, so no ones questions are more urgent then other ones.
    If its that urgent it would have helped if you had chosen the correct forum to ask your question BI Publisher

  • How do I thin a font in CS6? I tried a negative number in offset path and it didn't work.

    Hi!
    first time here. I posted this question in community guidelines by mistake, oops.
    Any help would be appreciated!
    I tried this with outlining the font and also without. The negative number in offset path doesn't thin, however if I do a preview and put in a positive number it does add onto the width of the font.
    Thanks,
    maryann

    I am going to share with you the secret to using type with appearance. After setting type change the fill to none(characheter level), then add a fill(type level). This way you do nto have 2 fills fighting with each other.
    Below I did not follow my advice to better explain what is happening, but I chose a different color fill. Even though I only have one fill, there is a black stroke coming from the character level.
    To salvage your existing type, double click so you select all the type with the |-Beam, your appearance palette will now say characters, and delete that fill.
    When you oultined your fonts, most likley the same thing happened, but a battle battle between the path and group level.

  • Change negative number for total amount in BP aging detailed report in PLD

    Dear Expert
    In BP aging detailed report, the total amount field display as
    -1,000.00
    May I know how to change the negative number format as
    (1,000.00)
    This is formula field.
    Thanks.

    Hi All,
    The settings can be changed from BeX (Query Designer or WAD).
    Please click on the Settings link in the generated report (either from Query Designer or WAD) and go the Data Provider tab.
    There is a header called Number Format and a drop down Display of +/- signs:, select different options from the drop down.
    Thanks and Regards,
    Arya

  • Negative number cannot be displayed in table if the column is too narrow

    Hi, All
    When a number is formatted  as a certain formatting(not locale formmatting),Negative number cannot be displayed in table if the column is narrower than the negative number, just minus is displayed.
    Can you help me? Thanks.
    Version: EHP1 for netweaver 7.0 SP3
    Best regards,
    Jiande Ding

    Hi,
    I think this has nothing to do with positive and negative numbers, By default the alignment of the text is Left, if you dont want to see '-' sign initially then you can change the alignment of the text to center or right in the display tab of properties for that column.
    As you as saying that at runtime the numbers are visible if manually adjusted. to icrease the width of that column permanently goto Layout tab of the story board and increase the size of the table and then increase the width of the column.
    the Fit Contents in the Layout should be set to "Actual Size".
    Regards,
    Rk.

  • My mountain lion upgrade is take long after the initial installation finish it is showing increasing negative number like -50 munites remaining

    My mountain lion upgrade is take long after the initial installation finished it is showing increasing negative number like -50 munites remaining while still saying installing os x on the disk.
    I mean it starting saying time remaining about 6 munites
    Now it up to time remaing about -55 munites
    I thing something is wrong with this installation and all I did is fallow the onscreen instruction
    Thank

    You might want to just manually power down your machine and, if necessary, start the installation process anew. You're unlikely to damage anything by doing this. It may have actually installed and is just hanging when it's supposed to reboot.
    Good luck,
    Clinton

  • Use array to store negative number

    Hi,
       I use "Initialize array" to set all the 500 elements to "0". Then I input numbers to  "Replace Array Subset"  and generate a new array. But all the positive numbers are correct, negative numbers just become "0". Why? How can I store the negative number in this array?
       Thank you in advance!

    Hi,
    what data type (numeric representation) are you using for the array elements? If it is integer, make sure it's not unsigned (U8, U16, ...) as this data type doesn't allow negative numbers.
    Hope this helps

  • Thread Running negative number of time.

    Hi All,
    I wrote a program to check the effects of Thread priority, however to my surprise the output is weired the higher priority thread shows that it run negative number of time, below is the code.
    package javaProg.completeReferance;
    class Clicker implements Runnable
         Thread t;
         int click;
         volatile boolean  running = true;
         public Clicker(int pro)
              t=new Thread(this);
              click = 0;
              t.setPriority(pro);
         public void run()
              while (running)
                   click++;
         public void start()
              t.start();
         public void stop()
              running=false;
    public class TestClicker
         public static void main(String [] args)
              Clicker thread1 = new Clicker(Thread.NORM_PRIORITY+2);
              Clicker thread2= new Clicker(Thread.NORM_PRIORITY-2);
              thread1.start();
              thread2.start();
              System.out.println("Processing");
              try
                   Thread.sleep(10000);
              catch (InterruptedException i)
                   System.out.println(i);
              thread1.stop();
              thread2.stop();
              try
                   thread1.t.join();
                   thread2.t.join();
              catch (InterruptedException i)
                   System.out.println(i);
              System.out.println("The number of Time Thread1 executed is "+thread1.click);
              System.out.println("The number of time Thread2 executed is "+thread2.click);
    }Here is the Output..
    C:\Users\pravin>java javaProg.completeReferance.TestClicker
    Processing
    The number of Time Thread1 executed is -386946835
    The number of time Thread2 executed is 837375311Thanks!!

    Thanks a lot , I changed int click to long and its
    working fine.I am wondering why the Java Platform
    didnt throw an error or exception for overflow.Because the Java specification calls for it not to do that but instead to do what you saw and rollover.

  • In MyVerizon, my current bill ballance is a negative number. What does that mean?

    It's a negative number, and it's red, instead of black like it usually is.  It also says my bill was paid in full on the 27th of December (autopay), but there was nothing on my bank account reflecting that.  What's up with that?

    If your balance due is in the negatives that means that you have a credit balance (i.e. VZW owes you money), that will normally be deducted from your next bill. As for your bank not reflecting the payment yet, it can take a few days for VZW to actually pull if from your account, but they post payments on their side immediatley.

  • I submit a negative number and it subracts twice the value

    I submit a negative number and it subracts twice the value on Numbers 08 running Lion

    "But as soon as I paste the two columns(column of names), (column of information) from the original bad sheet into it seems these pastings corrupt my numeric column in some way.  So it seems anything pasted from the original working sheet onto a good new sheet causes the new sheet to have the same problem."
    You might be able to strip that corruption with one of these techniques:
    Export the original document as a CSV file. Open this in Numbers, then transfer the names and information columns (individuallly) using Copy/Paste
    Export the original document as an MS Excel file, Open that file in Numbers.
    Copy the names column from the original document to the Clipboard.
    Select the first cell in the Names column of the new table.
    Use an Applescript to convert the contents of the clipboard to Text and paste it into the new document.*
       repeat with Information column
    Regards,
    Barry
    * I've contacted Yvan regarding a minor edit to a script he wrote some time ago to do this in Pages.

  • Invoice verification (negative number)

    I have a purchase order with 2 item. One of them is a return item with a higher price than the other.
    In the Invoice verification i have the following problem: if the prices from both itmes are added the BALANCE is positive so the AMOUNT should be negative to make the balance 0,  but if i write in the amount a negative number i get an error message "Negative values not allowed".
    Any ideas?
    Regards

    hi,
    you can try this with Subsequent Debit, In MIRO transaction, you do subsequent debit.
    Hope this may help you,
    Regards,
    Srinivas

  • Large Negative Number in Column Chart

    When using a large negative number (eight digits or more) from hierarchical data in a column chart, the browser FREEZES. Has anyone else experienced this? Any suggestions on how to fix? See the sample code below.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        <![CDATA[
            //hierarchical data.
            [Bindable]      
            private var input:Array = [
                { xfield:"World", value:-50000000, children:[
                { xfield:"Asia", value:15, children:[ { xfield:"Bhutan", value:1 }, { xfield:"Singapore", value:5 }, { xfield:"Thailand", value:17 }, { xfield:"India", value:10 }, { xfield:"Japan", value:15 }, { xfield:"Nepal", value:5 }]},
                { xfield:"America", value:30, children:[ { xfield:"Mexico", value:5 }, { xfield:"Brazil", value:8 }, { xfield:"Chille", value:6 }, { xfield:"US", value:25 }, { xfield:"Canada", value:22 } ]},
                { xfield:"Europe", value:20, children:[ { xfield:"Switzerland", value:8 }, { xfield:"UK", value:15 }, { xfield:"Germany", value:15 }, { xfield:"France", value:5 }] },
                { xfield:"Australia", value:23 }
        ]]>
    </mx:Script>
    <mx:ColumnChart id="chart" dataProvider="{input}" height="200" width="254" x="25" y="10">
        <mx:horizontalAxis>
            <mx:CategoryAxis categoryField="xfield" />       
        </mx:horizontalAxis>   
        <mx:series>
            <mx:ColumnSeries yField="value" />
        </mx:series>
    </mx:ColumnChart>
    </mx:Application>

    I am facing exactly similar issue in my project. can anyone help?

  • Prevent entry of negative number in input ready field

    Hello,
    In layout, in quantity input-ready fields, planner should not enter any negative number, if he tries to do so or by mistake, system should give error message.
    is this possible in BI-IP planning layout for input-ready fields ??
    thanks,

    Hi Jasmi;
    Sorry the late answer...
    Regarding your first question... you can built a function module to do the same. However, in this area I don't have ABAP knowhow to help you.
    There is no standard way to do it. This means definitions on the query or a formula.
    second question... in SE91 you had create a class message (like my example ZBI_IP) and a message number (in my example 004). Don't forget to add the text "no negative values allowed" to the message.
    I forgot to add (sorry again) the E of E004 means Error. If you want you can put W as warning. If Error the sequence of formulas stops. If Warning it continues (but it's better you double check).
    Reading the code...
    FOREACH ECON, FUND,PROJ.
    IF { YORCINIC, ECON, C_PL,NP_AC} < 0.
    MESSAGE E004(ZBI_IP).
    ENDIF.
    If I have a combination of ECON, FUND and PROJ for KF YORCINIC where the value is less than 0, the system presents the Error message 004 of the class message ZBI_IP.
    Tell me if this is good for you;
    Kind regards;
    Ricardo

Maybe you are looking for

  • Unknown error 1603 when trying to restore my iphone 3g in itunes - help!!!

    hello everyone - any help on the following issue would be greatly appreciated! just updated to latest version of i tunes on my PC, synced all my new music etc, then phone just got stuck on the black screen with the small apple logo in the middle. pho

  • Manually Moving Music to my iphone

    I manually manage music on my iphone.  In the past, I dragged music from my library or my purchases and dropped it into my iphone.  In Sept, I purchased an album and was able to put it on my iphone, but in Nov, using the same computer, I could not. 

  • Image in tooltip

    OK, I can beautify my tooltips with HTML, easy: lblMyLabel.setToolTipText("<html><b>Hello!</b>"); I can even make them multiline or place the tooltip contents into a table and modify everything with CSS, but there is still one thing I don't know how

  • Yikes, half my photos have gone to iphoto.data....

    Half my photos disappeared from my library, I found them in iphoto library DATA but how do i get them back in my library? It won't let me import them back... imac   Mac OS X (10.4.8)  

  • Lenovo U410 8.1 Audio Issues

    I have owned the Lenovo U410 Ideapad for a decent while now and I have been consitently satisfied with its preformance. Recently I uprgraded to Windows 8.1 and it does not play any sound from any source. After some searching I found the software to f