How to know which column belongs

Hello

I have a query that returns the lowest value between 3 columns ((EDT) 1, 2, time3) without taking into account null using NVL values.

All columns have varchar values and now I also need to know which column belongs to this value.

How can I get what I want?

Thank you

I use Sql Developer

I was able to set and change the minimum like this choice:

  CASE
    WHEN ptime2 IS NULL
    AND ptime3  IS NULL
    AND ptime1  IS NULL
    THEN 'vazio'
    ELSE least(NVL(ptime1, '24:00'),NVL(ptime2, '24:00'), NVL(ptime3, '24:00'))
  END AS PTime_DISPLAY,
  CASE
    WHEN ptime2 IS NULL
    AND ptime3  IS NULL
    AND ptime1  IS NULL
    THEN 'nenhum!'
    ELSE ''
      ||(least(nvl2(ptime1,1, 99),nvl2(ptime2,10,99), nvl2(ptime3,19, 99)))
  END AS Tee,

case 1 gives me the minimum

2nd case gives me to what column the previous value came from

Thank you all for your help

Tags: Database

Similar Questions

  • No other event in Photos? How will I know which photos belong to what album?

    My question is simple as that. I would like to organize my photos in folder/album/designated events everything must be located.

    Currently, it seems that I am unable to see what photos are belongs to what album when it is in mode "last import" or "photo".

    When I download tons of pictures and that you want to organize them here and there and when it does not show which photo belongs to where I'm really confused if it's worth to do that in photos.

    How can I know which photos belongs to which folder / album / event among tons of pics?

    I hope that there is an answer!

    Moments have replaced the events, and they are automatically created according to the date of capture and the location.  You can always find the moment that photo is with 'display in the Moment '.

    You can create albums and smart albums and folders and more moments, but it is not possible to show what photo albums has been added to the.

    That's why I mainly use keywords and smart albums. The keywords appear in the Info Panel, so I can see which picture belongs to smart albums.

    I only use standard for albums albums that I want on my iPhone and the iPad, because the smart albums does not synchronize mobile and these devices that I created as copies of smart albums.

  • How to know which programs are connecting to the internet?

    Hello

    How to know which programs or files are connected to the internet, including files and programs Microsoft?

    Thanks and greetings

    In Windows 7, use Ctrl + Shift + Esc instead of Ctrl + Alt + Delete. It lets you in the Manager of tasks more quickly. Select the performance tab, click the resource monitor and Network tab.  Network connections are included.

  • How to know which update causes the system crash

    Can you tell us how to check the update is the culprit?

    Hi Steve,.

    Inorder to know which update is the cause of the crash of the system, you can install the updates one by one. Firstly uninstall the updates that have been recently installed.

    Uninstall the update:

    1. click on start and type "update installed" in the searc box. Click on view installed updates

    2. right click on the update you want to uninstall. Once the uninstall is complete, reboot the computer.

    3. install the updates one by one.

    You would get to know what update is at the origin of the disorder. You can hide this particular update.

  • any ideas how to know which version of windows 8 is running on my laptop

    I have a hp Pavilion running windows 8, but the version that I use cannot update 8.1 download store. is there a way to know which version I have?

    Hello

    Type 'Information system' in the search...

    The update appears in the store?

    Do you have any kind of error messages?

  • How to know which version of DirectX is installed in Windows 7

    HOW CAN I FINDOUT WHICH IS the TYPE OF VERSION of DirectX

    INSTALLED ON MY PC

    Took me some time to find the answer on the microsoft site, but here it is.

    To use the DirectX Diagnostic tool to determine the version of DirectX installed on your computer, follow these steps:

    1. Click Startand then click run.
    2. Type dxdiag, and then click OK.
    3. On the System tab, note the version of DirectX displayed on the DirectX Version line.
    4. On the DirectX files tab, check the version information for each DirectX file.
    5. When you are finished checking file versions, click exit.

    If Windows cannot find the dxdiag, version 5.0 program or an earlier version of DirectX is installed on your computer. If this is the case, download and install the latest version of DirectX.

  • How to know which applications are currently installed in blackberry

    I have a gap of phone that allows the user to enter contact information (including credit card information). Once the details are entered, it should show a page that has the link for all installed applications for blackberry. Is it possible to know what applications are installed in blackberry. Can you please let me know how to go about it.

    You can query the system for applications that support specific features. In this list, you can then call the application that allows you to select the user by using the returned object.

    https://developer.BlackBerry.com/HTML5/APIs/BlackBerry.Invoke.html#.query

  • How to know which user object has a LOBSEGMENT given as SYS_LOB0000121913C00011$ $

    Hello

    I'm going to pretend to HW... So far, have been the following:

    1. Select DBMS_UTILITY. DATA_BLOCK_ADDRESS_FILE FOLDER (ID2) #.

    DBMS_UTILITY. DATA_BLOCK_ADDRESS_BLOCK (ID2) BLOCK #.

    the lock of v$ where type = "HW";

    11 1930

    11 1930

    11 1930... 29 documents returned.

    2. Select the owner, segment_type, nom_segment from dba_extents

    where file_id = 11 and 1930 between block_id and block_id + blocks - 1;

    MuUser LOBSEGMENT SYS_LOB0000121913C00011$ $

    But, now how can I find the object (say, table column and lob)?

    Also I used SAMS and LMT.

    Use the built-in DICT display for information on items in the dictionary

    Select * dict where table_name like '% LOB % '.

    results in DBA_LOBS and USER_LOBS

    and BINGO

    Often, there is no need to ask here, you have to just learn to use what is already there (and has been documented)

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

    Sybrand Bakker

    Senior Oracle DBA

  • How to know which card, layout or a collection is changing

    After using the DPS 2015 intensely, I found one of the most difficult things is to lose track of what map, collection, or layout, I'm editing right now. When I click on a map to change, I know at this time what card it is of course, but as I plow through all the options of the map, it's easy to forget which card I'm working on, especially if I am stopped. It would be awesome if at the top of the screen (maybe just side of the "map properties", "Collection" or "Available properties" indicator that appears in the upper left corner of the screen) the title of the map, collection or a layout being edited was posted. That would be really helpful.

    Good suggestion! I spent this on Andrei, who is owner of this area of the product.

    Neil

  • How to know which version of Linux (ESX 3.5)

    Hello, how can I know the correct version of my ESX Server?

    Thank you

    3.5 service console based on RHEL 3 Update 8.

    -KjB

    VMware vExpert

  • How to know which formula excel could not be converted to numbers?

    Hey guys,.

    3.6.2 numbers I used to open an EXCEL spreadsheet that uses a few different formulas.

    When you open the xlsx file, it tells me that failure to support formulas were replaced last calculated values.

    I have totally accept that, but is it possible to know, formulas THAT had to be replaced?

    Best regards

    Often, you will see a blue triangle in the upper left corner of the cells that have formulas not supported.  When you click the blue triangle, you should see a message like this:

    SG

  • How to know which mode (landscape/portrait) user is in

    How can you tell / changing your screen settings in html5/webworks if the user changes the orientation of the device?

    You can use the object and the window.orientation of JavaScript orientationchange event.  Here's a demo:

    http://BlackBerry.github.com/WebWorks-samples/kitchenSink/HTML/browser/orientation.html

    You can also use CSS3 media queries, define styles for portrait and landscape.  Here's a demo of it too:

    http://BlackBerry.github.com/WebWorks-samples/kitchenSink/HTML/CSS3/mediaquery.html

  • How to know which is the current active screen despite the menu is open?

    Hi all

    I'm developing a BlackBerry mobile application where a place in the program I want to know who is the current active screen and my request for a specific form, I want to take some actions.

    I realized that there is a follows;

    UiApplication.getUiApplication () .getActiveScreen)

    But the problem I face is when the Menu is opened on the screen of my application of that method above, gives me something net.rim.device.api.ui.menu.DefaultMenuScreen@629f6b5e in the active screen so for this instance even if my action should be handled is not due to the fact that the menu is the active screen.

    Y at - there no possibility of finding the menu screeen is open on top of what screen?

    Thank you

    Mukesh

    Have you tried with getScreenBelow and getScreenAbove?

  • How to know which camera files are supported in CS4

    Hi guys,.

    I searched this forum and support and have not been able to find an answer. We're going to buy a new camera in the not-too-distant future, and need to know if CS4 takes in charge that we buy eventually or if we will have to be upgraded. Is there anywhere on the Adobe site that has a list of files supported for Camera Raw in CS4?

    Thanks for any help, Linda

    Since you didn't say what operating system, these are links to windows:

    5.7 camera raw plugin, latest since cs4. Click on the camera raw Readme

    for a complete list of cameras taken in charge:

    http://www.Adobe.com/support/downloads/detail.jsp?ftpID=4681

    You can also use the 6.3 dng converter 5.7 does so ' t supports the camera:

    http://www.Adobe.com/support/downloads/detail.jsp?ftpID=4924

    MTSTUNER

  • How to know which version of SOA Suite is installed on an application server

    Hi all

    I want to know the version of the suite soa that is installed on my LINUX Server. Y at - it a command or a way of discovering what?

    Kind regards
    Smail

    Run soaversion.sh/cmd file $SOA_ORACLE_HOME/bin to the version.

Maybe you are looking for

  • Portege 3490CT - turn off problem

    My Portege 3490CT began to fade after between 1 and 15 minutes from powering it. It now has a damaged operating system because Windows Update was not able to complete an automatic update. Of course, I cannot locate a recovery CD and do not have a CD

  • Laptop computer AsusX205TA lights. Help

    1 month old laptop. Works well since Christmas as it was a gift. Very little use. Today, I hit the power button and won't turn on. I thought that the battery needed fresh and recharged for a few hours. Still won't turn...! Ido whay does Help... Thank

  • BTS of CIV 4 and Windows 7/64 bit home edition

    Everything starts fine, but when I actually play the game, it's slow as molasses January.It loads fast but slow times and I tried various bugs, but nothing seems to work. My system is i5/750, asus p7p55d, 4 gig of ram, xfx 9600gt 512 MB. Someone at -

  • How can I make playlists and Favorites

    When I download books on cd, they download on my computer as pieces and the pieces are sometimes 2-3 hours or more.  If I want to go back to hear something I missed or rewind a little when turning the player he's going all the way to the end.  Can I

  • Smartphones blackBerry how to enter custom text on the screen of the PRIVATE locking?

    Hello. If I want to add one in case of emergency number to my PRIV lock screen, how can I do this?