Is highest Null or more low value? using the fewest number of function...

So Null is one of the if not the highest value in a list of values.

Whenever I order a column, null has always been highest.

However, when I use the function less

Select * from bills by terms_of_discount desc;

Select LESS ('2 ', '5', '12', ' 3', null) double;

Select the LEAST ('apples', 'apps', 'applas', null) double;

In both cases the null value is the lowest

so I wonder why this is.

As mentioned in oradocs:

DESCRIPTION

The Oracle/PLSQL LESS function returns the smallest value in a list of expressions.

It's the greatest or least. As soon as you try to use the NULL value in a comparison, the answer is unknown.

So, if you have NOTHING in there, the answer will be NULL.

It goes the same for GREATEST().

Global functions (SUM, MIN, MAX, etc) ignore NULL values.

In ORDER BY, you can specify NULL FIRST or NULLS LAST.

Tags: Database

Similar Questions

  • need help to get the value using the REGEXP_REPLACE function.

    I am trying to extract the value placed between "< listitems >... < / listitems >" but I am unable to get these value using the REGEXP_REPLACE function.
    select REGEXP_REPLACE('<InputParameters></ParamSet><listitems>14545454</listitems></ParamSet></InputParameters>'
    ,'(<InputParameters>.*<listitems>)(.*)(</listitems>.*<InputParameters>)'
    ,'\2') from dual;
    required output:
     1454554
    Can someone please help me achieve this goal.

    Hello

    You forgot the / before the last InputParameters. If fix you that, your code will work.

    Here is a slightly different way:

    SELECT  REGEXP_REPLACE ( '14545454'
                     , '^.*?(.*?).*$'
                     , '\1'
                     )     AS listitems
    FROM    dual
    ;
    

    Least to type, the less likely you will have to make typos.
    If there are 2 (or more) elements of listitmes, 1 will be returned.

    From Oracle 11.1, you can also use REGEXP_SUBSTR. I have Oracle 10.2 avaialable now, so I can test the following, but I think you'd say:

    SELECT  REGEXP_SUBSTR ( '14545454'
                     , '(.*?)'
                     , 1
                     , 1
                     , NULL
                     , 1
                     )     AS listitems
    FROM    dual;
    

    When it comes with the text that is or looks to, XML, consider using XML functions.

  • I a s 6 more and when using the phone, if my face touches the screen it clicks on the logout button and the phone hangs up the call. Is it possible to prevent this without holding the phone away from my face when calling?

    I a s 6 more and when using the phone, if my face touches the screen it clicks on the logout button and the phone hangs up the call. Is it possible to prevent this without holding the phone away from my face when calling?

    iPhones have a proximity sensor which is supposed to automatically turn off the screen when you hold it in your face. If this is not the case you can take the phone and have it checked.

  • How to extract the second sysdate value using the EXTRACT function

    Hello

    I want to extract the second sysdate value using the EXTRACT function.
    When I run the following query I get an error;

    SELECT extract (second OF SYSDATE) FROM dual;

    ORA-30076: field of invalid extract for the source of the extract.

    When I do to extract the month I get the correct result.

    Is there some necessary formatting by specifying the sysdate (or any other date value) in the query. ?


    Thank you.

    You can extract only the year/month / day, day

    SQL> Select extract(year from sysdate) from dual;
    
    EXTRACT(YEARFROMSYSDATE)
    ------------------------
                        2008
    
    SQL> Select extract(day from sysdate) from dual;
    
    EXTRACT(DAYFROMSYSDATE)
    -----------------------
                         20
    
    SQL> Select extract(month from sysdate) from dual;
    
    EXTRACT(MONTHFROMSYSDATE)
    -------------------------
                           11
    
    IF you enter Minute or Seconds
    
    SQL>  Select extract(minute from sysdate) from dual;
     Select extract(minute from sysdate) from dual
                                *
    ERROR at line 1:
    ORA-30076: invalid extract field for extract source
    but with timestamp you can get the seconds
    
    SQL> select EXTRACT(second FROM current_timestamp) from dual;
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                  39.473
    
    SQL> select EXTRACT(second FROM current_timestamp) from dual;
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                  57.474
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                  59.787
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                    .412
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                     .99
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                   1.458
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                   1.896
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                   2.334
    

    Edited by: Viswarayar Maran on November 20, 2008 14:30

  • How and where can I find my Macbook Pro using the model number

    How and where can I find my Macbook Pro "using the MODEL number" NOT the serial NUMBER please...

    Hello world:

    I would like to know more about my MacbookPro using model # is if there is a website or a program that I can type my model # so she'll tell me more on my computer...?

    http://www.EveryMac.com

  • My OS has been upgraded to Windows 7 at 10 without disabling the software Adobe Acrobat. I am currently not able to use the serial number. to validate the (Acrobat 9.0) software installed on the machine. How can I go on the validation of the software not

    My OS has been upgraded to Windows 7 at 10 without disabling the software Adobe Acrobat.

    I am currently not able to use the serial number. to validate the (Acrobat 9.0) software installed on the machine.

    How can I go on the validation of the software now?

    Try contacting the Adobe Support via chat and ask them to reset your activations - don't ask more than that or they are likerly tell you to look on the forums for help (where no one can help with reset).

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat
    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • How to access a pension case using the case number

    I have a question which is considered by the media and I have a file number. I checked using my account, but don't see an option to access my cases. How can I use the file number to access the case?

    Hello

    Kindly click on the following link: https://www.adobe.com/cfusion/support/index.cfm?event=portal

    You will be able to see all your open and closed on this portal.

    If a case is closed for no more than 14 days, you will get an option to re open the case.

    Hope this helps!

    Kind regards

    Shipti

  • Had to reinstall my CS3 because of faulty hard drive. It does not accept my serial number as it says it is already used the maximum number of activations and says I should turn off. I can't as the hard disk failed! Please help.

    Had to reinstall my CS3 because of faulty hard drive. It does not accept my serial number as it says it is already used the maximum number of activations and says I should turn off. I can't as the hard disk failed! Please help.

    Have already tried to contact Adobe and they told me to reinstall the program. I did this and the same issue. It's crazy. I can not turn off something that I did not more...

    Thank you.

    No - I had, of course, tried all these things. Finally, I had someone (after several days) on the personal chat group that could fix and it did it in a few minutes. Too bad that nobody else seemed to be able to do. Adobe is very soft.

    I can't thank enough the other person - it was amazing.

  • How to disable a serial number on old computers (that don't work) in order to use the serial number on the new computer?

    How to disable a serial number on old computers (that don't work) in order to use the serial number on the new computer?

    Hi Amy,

    Please take a look at this document, for more information on the deactivation/reactivation of an Adobe product: Activation & deactivation help - Adobe.

    If you have any other questions, please let us know!

    Best,

    Sara

  • What is the maximum value of the specification number?

    Hello

    What is the maximum value of the specification number? When I put the number "UPDATE SpecNumManager SET StartingBlockNumber = 99999999"

    I create a few specs, I encounter error showing below when I try to save them. is this a bug? my version is v6111, thanks

    Thank you

    Terry

    Sql command execution error ' insert into specSummary (pkid, ActiveSigDocGroupSequence, AmberSLA, CreatedDate, EffectiveDate, fkAffiliate, fkCountry, fkGlobalSuccessionSpec, fkOriginatingTemplate, fkPermissionTemplate, fkProcessTemplate, fkSpecBusinessUnit, fkTaxonomyNode, SpecStatusID, GlobalSuccessionState, InactiveDate, IsHidden, IssueNum, IsTemplate, langCreatedIn, LastEdit, OriginatorID, OriginatorNameHistorical, OrigLangID, RedSLA, securityAccessLevel, SpecID, SpecNum, SpecNumber, SpecType, replaces, theOriginator, WorkflowStartDate) values (' 20205484dea2 - 2 ca 6-41eb-9806 - cce52513e7d4 ', '0', '0', August 19, 2013 10:01:27 ', August 19, 2013 10:01:27 ', NULL, NULL, NULL, NULL, '6000d0acb239-b9c6 - 478-a - 8 c 99-4ec741d2a1a5', "57566dc3c46b-b2fe-4276-ae7f-f7f1c28a913f") , NULL, "2141e3469193 - 4A 05-4953-9ef4-8bc08c1b1fb8 ', '2090111 c 6416-6de4-4707-b498-48a18671ca27', '-1234567890', 12/31/9999 00:00:00 ', ' 0', N '001', '0', '0', August 19, 2013 10:01:45 ', ' 0', not admin, Prodika ', ' 0', '0', '0', '2147d635d721 - 2ca 2-411 c-beed-d1584f7498ff', N '100000002', ' 100000002-001 ', ' 2147', NULL, ' 20533b94710f-5396-4487-bdd5-08d21365eefa»(, 19 août 2013 10:01:45 ') '.

    Specification numbers are 7 digits long. I believe that by default, the starting number is 5000000.

  • I lost my ipad I need to add the device to icloud by using the serial number. Can I do this?

    I lost my ipad I need to add the device to icloud by using the serial number. Can I do this?

    N ° you can not add it without physical access to the device.

  • IMessage will use the telephone number; use a colurriel instead

    I had no service iphone since February, so I only use imessage on wifi. Today, however, he ceased to imessages send my phone number, and I don't know what to do. I tried to turn on and off imessage but it said activation pending and send & receive there is a circle of loading of my phone number and number highlighted grey. I've never had this happen before that I am at a loss

    UH I have never asked a question here but: iPhone 5. 64G, about 38 available; I don't know what everything is on my phone :-/

    beachpickle wrote:

    I got no service iphone since February

    This is perhaps the reason for your question?  You use an iPhone that has no telephone service?  So you have no cellular carrier currently associated with the iPhone?  Yet, you want to use this phone number non-functional as the mechanism for your iMessages?

  • Can I use the serial number of Windows 7 Home Premium to reinstall my system?

    Can I use the serial number of Windows 7 Home Premium to reinstall my system?

    If you mean the license key on the sticker cost of Windows on your computer, then Yes, you should be able to use it to activate the same hotfix version of via a retail disc. You * may * need to use for phone activation method accomplish, however.

    Kind regards.

  • If I buy a new hard drive, I use the activation number provided with my computer to re - install Windows XP?

    activation and replacement hard drive

    Greetings from St. John's Newfoundland. My wife has given car for my birthday washer and I wiped the ENTIRE hard drive, including the operating system. (XP). I have recovery CD but the computer will not read and install XP. I want to know it is if I buy a new hard drive, can I use the activation number provided with my computer to re - install Windows XP?

    Hello

    Yes, you can use the activation code for re - install Windows XP.

    Note: If you have exceeded the number of times to activate the product, then you would not be able to activate, you may need to contact the manufacturer to perform a factory restore.

  • Using the serial number to install InDesign from web

    I have a disc for installation of InDesign, but my new computer doesn't have a cd player. Can I use the serial number and download the software on the web?

    Yes.

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

Maybe you are looking for

  • Qosmio G10 video problem with RAM

    G10 with: replacement card with nvidia go6600.After the overheating of the videosubsystem appear artifacts on the screen.Chip GPU has been changed, but the artifacts on the screen has not disappeared. As amended VRAM chips, but we did not find SAMSUN

  • 3.6 loading afterb stil be message get the upgrade

    I downloaded the latest version of firefox 3.6 and after loading, I get the message "your version of firefox is no longer protected against online attacks" get its fast and free upgrade.I downloaded several times and I still get the same message.Also

  • L8L11AV: L8L11AV

    How can I open the case for this model L8L11AV... a HP 17 t it didn't open as most laptops. the standard Panel, or the black botton HP 17 t, the botton is money.

  • User did not log on type on this computer. __

    the problem: I recently tried to add parental controls to my sons computer in his bedroom... He was the only user configured on the machine at the time where he was as "administrator." As you know I couldn't put parental controls on an administrator

  • BarcodeDetector more RegistrationHandler.cpp for connection of platform BBM surveys will not work

    Hi all I'm writing an application that will scan qr codes using the camera in the qml with a sensor attached barcode object. It works fine, but I want to connect my application to the bbmsp, and I used the example code provided by Blackberry in the c