Checking the negative value

Hey guys I have a result on the ground which is of type varchar, but it stores numbers. I want to check if the value is negative or not. The code below works perfectly except for 1 case where the result has only ' - '. -indicates a missing value not a negative... How this can be fixed. Here is my code snippet.
-Search for numeric values
IF (trim (TRANSLATE (resvalue,'+ -. 0123456789', ' ')) IS NULL) THEN
-Look for the negative value if the value is numeric
IF (substr (resvalue, 1, 1) = '-' AND substr (resvalue, 0, 1) is not null) THEN
v_ret_msg: = v_result_name | "" A negative result. "

Also check the LENGTH of resvalue.
That is to say:
If length (resvalue) = 1 and substr (resvalue, 1, 1) = '-' then...

Tags: Database

Similar Questions

  • validation to regret the negative values...

    I have a class called "P14_No_of_days"...

    In this field the negative value should not accept that any validation is there?

    pls help me guys

    SKUD,

    Put code next under Edit Item-> HTML Form Element section "attributes".

    onkeyup='this.value=this.value.replace(/[^0-9]/g, "");'
    

    It will limit users to enter non-numeric characters.

    Kind regards
    Hari

  • Customize alert messages to check the duplicate value and alert success

    Hi all

    I want to show two alert against the button 'Submit' even at -.

    1 the attention of messages to check the duplicate value and show the duplicate value found alert and
    2 alert if successful the form's success to commit no duplicate values found.

    I did all the thing but what alert-1 show and I pressed the ok button of the alert, then the second alert also shows that I don't want to show.

    Who can I do about it? Have someone to help me!

    Arif

    Use the folliwng in PRE-INSERT-TRIGGER.

    There is not a lot of changes with the exception

    where CANCELLATION_USERID =: CANCELLATION_USERID;

    and

    If valExists > 0 then

    declare
    
     valExists number;
    
    begin
    
     select count(*) into valExists
     from USERDELETION
     where CANCELLATION_USERID = to_char(:CANCELLATION_USERID);
    
     if valExists > 0 then
      message('Duplicate value found !');
      -- show_alert('ERROR_ALERT');
     else
      message('All is well');
      -- show_alert('All is well ');
     end if;
    
    end;
    
  • correctly when reading the negative value

    Hi all,

    It's about power meter device. in fact, I've already got the good value here, but I create additional calculations. the situation is:

    When the power reading is positive, I enjoy reading.

    power is negative, I misread (high value). so I need to subtract this value to 2 ^ 32 (or 4294967296).

    is that someone he knows the reason why he needs to happen?

    OK, "registers" are tables of U16. so try to typecast I32. How many elements in the table?

    Somehow, you do everything with tables, but you only display one item. It almost seems to me that everything going primitive "contact numbers" be given ordinary scalars. There are also a lot of duplicate code. You might get away with an instance and a loop FOR, for example.

    Representations of data are a mess with a wild mix of types of data and constraints. The Psum (High value) is I64 without reason (under the constraint of a DBL two values U32 (?) division). I do not understand the function of the Subvi. Can you explain?

    You can place an indicator of one of the 'registers' tables, run the VI so it contains data, then turn the indicator in a constant of schema that contains the typical data (Right-Click... change to constant). Save and attach the VI.

  • remove the negative values in table

    I have a table 1 d of data depending on the positive and negative values. I'm trying to search for negative values and remove them from the table.  This corresponds to the data in the column in the second table 2D that should also be deleted. A minor problem is that there are an additional column in the 2D array that must be skipped.  I have the code that should do it.  The problem is that if I have two negative numbers in a row the code doesn't thow on the other.

    This first picture is the answer I get when alternate positive and negative values.  It shows the correct answer.

    When I change the first1 of the positive a-1 value as shown below...

    ... I get the following response.

    FYI, some other things such as conversion are here because I'm trying to manipulate the actual data set is enormous.  I test everything I do with the numbers that I can actually follow before I apply in my real program.  That's why I do extra things.

    Thanks for the help!

    Here is the solution, that increase the index when you do not remove an element. In addition, whether you use the "less then or equal" when you use the "lower to."

  • How to check the decimal value in the number field

    Is it possible to find the number of decimal digit is used.

    999.444
    444.45
    344.23
    33.666666666666

    Query provide rusult after the decimal value.

    Thank you.

    user-Keen wrote:
    Query provide rusult after the decimal value.

    Thank you.

    your_col - trunc(your_col)
    

    You have negative numbers?

    For negative values that you want to display?

    If only the decimal part, you can use ABS (col) - trunc (ABS (col))

    Published by: JAC on 4 April 2013 15:29

  • How to check the current values of COMMIT_WAIT and COMMMIT_LOGGING

    Is it possible that you can check in a session to determine the current settings for COMMIT_WAIT and COMMMIT_LOGGING? I am not referring to a situation where they are defined via ALTER SYSTEM and changed the world, but changed using ALTER SESSION and locally defined. I'm currently testing a trigger to do it for a very specific batch user and just need to be able to log on and check if the adjustment was established successfully or not.

    >
    Is it possible that you can check in a session to determine the current settings for COMMIT_WAIT and COMMMIT_LOGGING?
    >
    Well, since these are the initialization parameters, you can check the PARAMETER V view $

    select name, value from v$parameter
    where name like 'commit%'
    
    NAME,VALUE
    commit_point_strength,1
    commit_write,
    commit_wait,
    commit_logging,
    

    And after changing their

    alter session set commit_logging = 'IMMEDIATE';
    alter session set commit_wait = 'FORCE_WAIT' ;
    
    NAME,VALUE
    commit_point_strength,1
    commit_write,
    commit_wait,FORCE_WAIT
    commit_logging,IMMEDIATE
    
  • How to check the previous value of the element in a multi-record block

    Oracle Version: 10 g
    Forms Version: 10 g

    Hi all
    Hello everyone, I have a multi-dossier block in a form where one of the values of elements is of LOV.user can select the value of LOV.

    If once the user selects the value of LOV and moves to the next of the multi-file record, and selects the value of LOV again, I shouldn't allow users to select the previous value of the user in order to avoid duplication of records.

    and important remark is that I should get there before you save it in the database because once registered in the database I can compare the values and hide the previous value.


    Any help will be appreciated.


    Thanks and greetings

    This is a question frequently asked in the forum! There are several different solutions. Take a look at the following articles. Both will perform the necessary verification of duplicates.
    Forms - registration of treatment group (value in double check...
    or
    Avoid records duplicated in a block

    If none of these solutions don't work for you, search the forum for other options.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • How to make an alarm in VeriStand that checks the specific value?

    I need the alarm is triggered when the string value is 0x2C and only 0x2C.

    Creating calculated a channel, then select "Conditional" in the drop-down list.  The condition of '=' to compare your channel to a constant value.  The calculated channel will be 0 when the condition is false, and 1 when it is true.  You can then create an alarm based on the calculated string you created.

    Hope that helps!

  • Creation of parameter: impossible to check the default values

    Hello
    I want to create new settings, and I want to give the user a set of default values. My problem is that for some fields, the 'default' value is available, but some other times this option is grayed out? Why?

    Thank you

    Hello

    I want to create some new settings and I want to give the user a set of default values

    the default value is only 1 and it is hard-coded.
    It is still available on the setting screen.

    My problem is that for some fields, the 'default' value is available, but some other times this option is grayed out? Why?

    I guess here, but when you say gray, do you mean the LOV are not?
    This list of values are called "Classes of elements" and that they are defined using the discoverer administrator, whenever an element class is defined, you will get the list of values for this element.
    You can read more about element classes here:
    http://download.Oracle.com/docs/HTML/B10270_01/item_cla.htm

    Tamir

  • You should check the no. values returned by lov in the shuttle

    Jin

    I create a shuttle service that will populate the employee shuttle (left) on the selection of the Department only.
    now I want to check the number of employees filled in the shuttle (left) and if the number of populous employees is null so I want to fill the shuttle with the EMP. who are on the bench..,.


    can someone pls suggest me a solution.

    now how to make the "bench".

    When we communicate bench? You have not given me a clear answer on that yet?
    You said key first, and then you answered page gets sent. So at what point do you do this?

    Just to make my question more clear

    If the number of employees is null

    When you want to check - when the Department is changed?

  • Data file see the negative value

    Hello, well this post here because the Support of Oracle will not answer this question, its been 2 weeks and many phone calls to "try and speed it up. IM wondering whats up with them now...

    In any case!

    Oracle 10.2.0.2
    Linux x 86

    These files are difficult to maximum 4 and 15 GB, but now they show 30 GB and 60 GB of free space.
    tablespace file bytes free bytes
    ORACLE_DATA /data/oracle/padb/oracle_data_12.dbf 4000 34947
    ORACLE_DATA /data2/oracle/padb/oracle_data_31.dbf 15000 60298 
    And I'll upload a picture Grid Control:
    http://img190.imageshack.us/img190/3594/oracledata31dbf.jpg
    http://img200.imageshack.us/img200/1526/oracledata12dbf.jpg

    Did you ask where the actual data is gone? Because these files should / have 4 GB and 15 GB of data in them, but now his party and instead his free more space than what is available.

    Grateful for any help.

    Hello

    You can serve your dba_recyclebin, and then try again.

    Please cehck:

    Bug 5083393: VALUE FILE_ID AND DBA_FREE_SPACE RELATIVE_FNO ARE DIFFERENT

    Use negative for an Oracle data file. [444170.1 ID]

    Concerning
    Rajesh

  • How can I check the voltage values on the acquisition of data with a data acquisition assistant and the custom scale?

    I use a custom scale and the DAQ assistant to acquire data from a USB DAQ device.  How can I display voltage gross values at the same time?

    Thank you

    David

    Do not use the ladder custom, but read the raw data using the daq assistant and adapts the data later. Or the scale of the data using the inverse of the custom scale.

  • Check the string value when using xdoxslt

    Hello

    I'm new to the BEEP and will have questions in writing this simple code for a model RTF. In plain language, that's what I want to do:

    If (instr(FirstName,'concern',0) > 0 and instr(LastName,'concern',0) > 0 and instr(MiddleName,'concern',0) > 0) then the VNAME variable value "

    on the other

    If (instr(LastName,'1-',0) > 0), then set VNAME variable FirstName

    on the other

    the value of VNAME variable FirstName + "" + name

    Finally... show the VNAME variable

    ===========

    I wrote it, but it doesn't work:

    declared variable... Initialize it to x.

    <? xdoxslt:set_variable($_XDOCTX,_'v_RTPMName',_'x')? >

    String value of control-> - error.

    <? If: (xdoxslt:Instr (lower(coFirstName|| coMiddleName || coLastName), "abuses", 0) > 0)? >

    <? xdoxslt:set_variable($_XDOCTX,_'v_RTPMName',_'')? >

    <? end if? >

    write the variable

    <? xdoxslt:get_variable($_XDOCTX,_'v_RTPMName')? >

    Thanks for the help!

    For a quick overview,.

    InStr is belong to the xdofx family, must be used in this way instead of xdoxslt:Instr()

    For example: If condition 1 0 otherwise true back

    0 then 1 or 0 end if? >

  • Negative value to run to analyze the report in the statspack report

    Hello

    I use Oracle 10.2.0.3.

    In the Execute to analyze the value of its pack stats report report, I get the negative value-35%. I read that this means that there are more number of parse as executions. But how and where it can be checked off, and what step I can take to resolve/correct this?

    I have a procedure 'a' who calls the procedure b, c and d in it.

    I have a table "t" that is referenced in the proceedings b, c and d (not in one)

    I've run a DDL on the table "t" where, by b, c and d invalid and in which cases invalidate the procedure as well.

    I call the procedure 'a' for execution, but in this procedure, I circumvent enforcement of procedures b, c and d (I can do this based on a condition and I don't call these procedures during execution of the procedure a).

    Then, when I call the procedure, it will be recompiled, but before he could be recompiled, oracle has recompile b, c and d as well.

    So in this case, I don't have that a single execution of procedure 'a' but compilation of a, b, c and d have run to analyze the ratio of 1:4.

    I hope you understand now. Which is why I suspect me that your procedures are be invalidated yet and still have several compilations.

    Salman

Maybe you are looking for

  • Dv5 1040ee drivers for Windows 7

    Hi all: I plan to upgrade my laptop to Windows 7. I'm trying to find the right drivers for my lappy. It's a HP Pavilion DV5 1040ee, with Windows Vista Home Premium, Service Pack 2. Product number is 536EA #ABV I need all the drivers like video, graph

  • Overview of the images by getting only.

    Ive just made a complete analysis. problems have been detected and removed, but Ive always had this problem. When I open my email or open internet I get only the outline of the images. If I keep repeating the action it will correctly open a few times

  • backup continues to stop and can't understand why

    I tried to back up my systems. It starts and then I get an error message indicating save not completed successfully. I can't understand I have and if anything I am doing wrong

  • The upgrade of the Belvedere 6.2 and 6.5

    If I upgrade my Lookout 6.2 to 6.5 server which is also the same machine is my Web Player folder, clients running always drive Web 6.2 will be able to run the process file new 6.5 in my folder of drive on the server?

  • Service Packs 1 and 2 will be not instal

    Hello To install IE9, I need to install SP1 and then SP2 on Vista. All windows updates seem to be up-to-date. When I try to install SP1, the process takes about 2 hours. The final messages saying something like "100% complete", but then "SP1 will not