Highest, lowest, and zero removal

Hi everybody...
I am getting varchar value from file like this....
varchar x =343,987,0,763,22,88,099,736,0,22,0
Now i want to find the highest, lowest, and if any only zero values are there, i have to remove zeros.
I have to update table with these values(highest, lowest, and zero removed value)
For highest, i wll do with GREATEST function. For other two, any help is appriciated.
Thanks in advance...
Pal

SQL> var x varchar2(40)
SQL> exec :x := '343,987,0,763,22,88,099,736,0,22,0'                                                                                                                           
SQL> var highest number                                                                                                                                                        
SQL> var lowest number                                                                                                                                                         
SQL> var nonzero varchar2(40)                                                                                                                                                  
SQL> set autop on                                                                                                                                                              
SQL> exec execute immediate 'select greatest('||:x||'),least('||:x||'),substr(replace('','||:x||','','',0,'','',''),2,length(replace('','||:x||','','',0,'','',''))-2) from dual' into :highest,:lowest,:nonzero
NONZERO
343,987,763,22,88,099,736,22
    LOWEST
         0
   HIGHEST
       987
X
343,987,0,763,22,88,099,736,0,22,0

Similar Messages

  • Getting the lowest and highest dates from a column

    <Praise>Numbers is absolutely incredible. Kudos to the Apple team. From the first time I've used it, it has enabled this average spreadsheet user to create awe-inspiring layouts from average data. I'm extremely excited to see where Apple brings </Praise>
    What I am trying to do though is this. I have a column with dates in it. I'm trying to get the lowest and highest dates in that column for a report. For instance, "Date range between 7/1/2007 and 9/11/2007".
    Any help would be very much appreciated

    Let me also pose this. I've been asked to create a two date ranges for this from the same data. This report will need to be updated every two months. Is there a way to specify the spreadsheet to select only rows with a date between X and Y for processing?
    Or, more likely, is there a way to access a cell name by reference from another field? Such that I have a "Current From", "Current To", "Historic From", and "Historic To" column. The value of these fields could be references to a row number that has the beginning and ending date, so that it selects all of the rows in between.
    So I would have something like SUM(SourceSheet :: SourceTable :: A{CurrentTable :: A2} : SourceSheet :: SourceTable :: A{CurrentTable :: A3}) where CurrentTable A2 and A3 are "2" and "6" for rows A2:A6. Is this even possible? Hopefully I'm overcomplicating it and there's a magical function out there that I've missed.

  • Lowest and highest score in java 5...

    hi guys....i've coded this program to calculate percentage and average of scores input ....and I need to calc the lowest and highest input of scores by the user.....what should i do.....can anyone help.....pls find code below...
    Coding Starts here---
    import java.util.*;
    public class AssignmentOne
         public static void main(String[] args)
              int score = 0;
    char grade;
    int totalScore = 0;
    int count = 0;
    int gradeA = 0;
    int gradeB = 0;
    int gradeC = 0;
    int gradeD = 0;
    int gradeF = 0;
    double percA = 0.0;
    double percB = 0.0;
    double percC = 0.0;
    double percD = 0.0;
    double percF = 0.0;
              Scanner keyboard = new Scanner (System.in);
              System.out.println();
              System.out.print("Enter numerical scores in the range of 0 to 100: ");
              System.out.println("integers only, please!\n");     
              while (score >= 0 && score <= 100)
              System.out.print("\nPlease enter a score from 0 to 100.");
              System.out.println(" Enter a score below 0 or above 100 to quit:");
              score = keyboard.nextInt();
              count++;
              totalScore = totalScore + score;
    if (score <= 100 && score >= 90)
    gradeA++;
         else if (score <= 89 && score >= 80)
    gradeB++;
    else if (score <= 79 && score >= 70)
    gradeC++;
    else if (score <= 69 && score >= 60)
    gradeD++;
    else if (score <= 59 && score >= 0)
         gradeF++;
         else
              totalScore = totalScore - score; // to ommit last entry as it is to terminate loop     
         count = count - 1; // to ommit last entry as it is to terminate loop
              System.out.println("\nTotal number of grades = " + count);
              System.out.println("Number of A's = " + gradeA);
              System.out.println("Number of B's = " + gradeB);
              System.out.println("Number of C's = " + gradeC);
              System.out.println("Number of D's = " + gradeD);
              System.out.println("Number of F's = " + gradeF);
              percA = ((double) gradeA / count) * 100;
              percB = ((double) gradeB / count) * 100;
              percC = ((double) gradeC / count) * 100;
              percD = ((double) gradeD / count) * 100;
              percF = ((double) gradeF / count) * 100;
              System.out.println("\nPercent A's = " + percA);
              System.out.println("Percent B's = " + percB);
              System.out.println("Percent C's = " + percC);
              System.out.println("Percent D's = " + percD);
              System.out.println("Percent F's = " + percF);
         //     System.out.println("\nLowest score = " + Math.min(score));
         //     System.out.println("\nHighest score = " + Math.max(score));
              System.out.println("\nAverage score = " + (double)totalScore / count);
    Coding Ends here---

    if I want to get the lowest value of all the scres
    that a user inputs, then how should I go about it??
    Can I use MAX_VALUE instead??Now can we just hold on one minute please and think about this? Why do you think MAX_VALUE would be useful in determining the lowest anything?
    I mean does that make sense to you?
    If there was a method named max that helped you do you think there might be an inverse type method named min that could do something like you want? Perhaps.

  • Database file sometimes gets to zero size and zero file flags

    I have a problem that on my system sometimes single database file gets to a state where it has zero size and zero file flags ( as if set chmod 0 file ).
    My database runs 24/7 and there are multiple agents running at the same time. My database files are backed up and removed from time to time to protect stored data. So I guess that this error could come up when two agents get to backup or recover the database file at the same time. Though, it is hard to find if it is caused by this problem, so I'd like to ask if there is anyone who stumbled on same problem - where one database ends up in state of 0 flags and 0 size.

    Hello, anyone has any tip about this issue?

  • I get unwanted Custom Access on files and cannot remove them.

    Since I installed Snow on my iMac quad core, with 10.6.7 at present, I get irregular custom access permissions applied to files and cannot remove some of them. I have tried Tinker Tools System and sometimes that works and other times it does not.
    I have wiped my hard drive clean and zeroed it and reinstalled the system many times and it seems to make no difference.
    The latest occurance was my users folder had custom access applied to it for no obvious reason. I was able to remove it from the user folder but not able to remove it from my home folder.
    I have worked with Dr. Howard Oakley from Mac User magazine and he was unablr to solve my problem also. He has helped me on others with great success.
    HELP!!!!

    Are you using a machine with only one account (which then of course is the account with administrator authority)?  Rather than completely rebuilding the system, did you use Disk Utility to Repair Disk Permissions?
    To repair permissions, boot from the Install DVD while holding down the ‘C’ key. 
    Select your Language preference and when the OS Install screen appears, go to the Tools menu in the Apple menu at the top of the screen and select Disk Utility. 
    From there click on First Aid and then run Repair Disk Permissions a few times in succession.  There will be some error or warning messages left, but they usually can be ignored. 
    Did that help?

  • My MacBook Air 13' (2013) will occasionally start the fan at full blast, not connect to any wifi or detect any wifi, and will remove the battery icon from my menu bad as well as tell me there is no battery connected. How do I fix this?

    My MacBook Air 13' (2013) will occasionally start the fan at full blast, not connect to any wifi or detect any wifi, and will remove the battery icon from my menu bad as well as tell me there is no battery connected. How do I fix this? I have restarted my computer multiple times, **** it down, and ran a diagnostic test to tell me nothing is wrong and my computer is not running any applications. There is no reason for the fan to be on full blast! when I try to set the option to show my battery icon in the menu bar, it will automatically uncheck. How do I fix all of this?

    Have you tried SMC and PRAM resets?
    http://support.apple.com/kb/HT3964
    http://support.apple.com/kb/ht1379
    Ciao.

  • How to close a frozen warning: I am unable to close the "charicter boarders aren't supported and were removed" warning on my pages. Untill warning is closed I can not save my document. How can I get my document saved?

    I have an unsaved document open in pages but can not save it because the, "charicter boarders aren't supported and were removed" warning is open and I can not close the warning. How can i get the warning to close so I can save my document? Can I save the document without closing the warning?

    Probably not, but as you will have been unable to make any changes to the document with that warning window open, you're not going to lose anything by quitting (or force quitting) without saving. You'll still have the original document you were trying to import.
    I would suggest attempting to open the document in one of the open source Office applications, LibreOffice, Apache OpenOffice, or NeoOffice, each available for download from the linked sites. Once open there, remove the attributes that are causing the warning, save the file (as an MS Word document), then try opening that version in Pages.
    Regards,
    Barry

  • My MacBook Pro is running VERY slow. I am constantly getting pop-ups and now I got one that says my computer may be infected. What do I do to check for viruses and or remove them if there is one?

    What do I do to check for viruses and or remove them if there is one? I have never had a problem with my mac until now. It is running VERY slow

    This is what it came up with.... any ideas?
    EtreCheck version: 1.9.11 (43) - report generated May 27, 2014 at 11:07:36 PM CDT
    Hardware Information:
              MacBook Pro (15-inch, 2.53GHz, Mid 2009)
              MacBook Pro - model: MacBookPro5,4
              1 2.53 GHz Intel Core 2 Duo CPU: 2 cores
              4 GB RAM
    Video Information:
              NVIDIA GeForce 9400M - VRAM: 256 MB
    System Software:
              OS X 10.9.3 (13D65) - Uptime: 1 day 23:26:50
    Disk Information:
              Hitachi HTS545025B9SA02 disk0 : (250.06 GB)
                        EFI (disk0s1) <not mounted>: 209.7 MB
                        Macintosh HD (disk0s2) / [Startup]: 249.2 GB (20.75 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
              MATSHITADVD-R   UJ-868 
    USB Information:
              Apple Inc. Built-in iSight
              Apple Internal Memory Card Reader
              Apple Inc. Apple Internal Keyboard / Trackpad
              Apple Computer, Inc. IR Receiver
              Apple Inc. BRCM2046 Hub
                        Apple Inc. Bluetooth USB Host Controller
    Gatekeeper:
              Anywhere
    Kernel Extensions:
              [not loaded] com.rim.driver.BlackBerryUSBDriverInt (0.0.39) Support
              [not loaded] com.rim.driver.BlackBerryUSBDriverVSP (0.0.39) Support
    Problem System Launch Daemons:
              [failed] com.apple.wdhelper.plist
    Launch Daemons:
              [loaded] com.adobe.fpsaud.plist Support
    User Launch Agents:
              [loaded] com.adobe.ARM.[...].plist Support
              [loaded] com.macpaw.CleanMyMac.helperTool.plist Support
              [loaded] com.macpaw.CleanMyMac.trashSizeWatcher.plist Support
              [loaded] com.macpaw.CleanMyMac.volumeWatcher.plist Support
              [running] com.whitesmoke.uploader.plist Support
    User Login Items:
              iTunesHelper
              AdobeResourceSynchronizer
    Internet Plug-ins:
              JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
              FlashPlayer-10.6: Version: 13.0.0.214 - SDK 10.6 Support
              Default Browser: Version: 537 - SDK 10.9
              AdobePDFViewerNPAPI: Version: 11.0.06 - SDK 10.6 Support
              AdobePDFViewer: Version: 11.0.06 - SDK 10.6 Support
              Flash Player: Version: 13.0.0.214 - SDK 10.6 Support
              QuickTime Plugin: Version: 7.7.3
              Silverlight: Version: 5.1.10411.0 - SDK 10.6 Support
              iPhotoPhotocast: Version: 7.0
    Safari Extensions:
              WhiteSmoke: Version: 1.0.0.1
              Vidx: Version: 2.0
              DivX Plus Web Player HTML5 <video>: Version: 2.1.2.145
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
              AirPlay: Version: 2.0 - SDK 10.9
              AppleAVBAudio: Version: 203.2 - SDK 10.9
              iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins:
              Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    User Internet Plug-ins:
              Move-Media-Player: Version: npmnqmp 071801000001 Support
              fbplugin_1_0_1: Version: (null) Support
    3rd Party Preference Panes:
              Flash Player  Support
    Time Machine:
              Time Machine not configured!
    Top Processes by CPU:
                  12%          DashboardClient
                   6%          coreaudiod
                   6%          WindowServer
                   5%          repair_packages
                   3%          VLC
    Top Processes by Memory:
              549 MB          repair_packages
              143 MB          com.apple.WebKit.WebContent
              131 MB          Safari
              119 MB          installd
              94 MB          mds_stores
    Virtual Memory Information:
              809 MB          Free RAM
              1.82 GB          Active RAM
              224 MB          Inactive RAM
              630 MB          Wired RAM
              3.66 GB          Page-ins
              207 MB          Page-outs

  • A month ago my iPhone was stolen, I turned on Activation Lock but it never came out BUT an hour ago somehow my apple ID was changed and someone removed from the account both iPhone and iPad and the iPad was also removely wiped. Can Apple help me somehow?

    A month ago my iPhone was stolen, I turned on Activation Lock but it never came out BUT an hour ago somehow my apple ID was changed and someone removed from the account both my iPhone and iPad and the iPad was also remotely wiped. As soon as I saw it I recover the password and return the access to my iPad. But iPhone is not registered for my apple ID any longer. Can Apple help me somehow? I have all the documents and the iPhone box. Will they lock the iPhone and return me access to it. I'm sure it's been attached to another apple ID.
    PS. the apple ID I'm using on the discussons is not the hacked one.

    Try contacting the Apple account security team and ask: http://support.apple.com/kb/HT5699.

  • Hello! I was on my Mac and then I clicked on iTunes. Then I clicked on iTunes, and accidentally removed my device from my Mac, how can I get it back? Also when I plug my iPod into the computer, it downloads everything, how can I stop this. please help!thx

    Hello! I was on my Mac and then I clicked on iTunes. Then I clicked on Account, and accidentally removed my device from my Mac, how can I get it back? Also when I plug my iPod into the computer, it downloads everything that is on my computer, how can I stop this. please help! please help!!!!!!thank you

    Is the iPod still singed into the account isn Settings>iTunes and App Stores and SettingsZ>iCloudl? If it is then I would not be concerned.
    Also see:
    iTunes Store: Associating a device or computer to your Apple ID
    since you may have started the 90 day window.
    For the other "problem", go to iTunes>Preferences>Devices and check the box that says Prevent iPod....automatically syncing.

  • How to copy and paste the graphics from illustrator to MS word. What I tried is exporting in png with highest resolution and then inserting in to word. This loses a bit of resolution in comparison to direct copy and paste as EMF.  But if I do a copy and p

    How to copy and paste the graphics from illustrator to MS word. What I tried is exporting in png with highest resolution and then inserting in to word. This loses a bit of resolution in comparison to direct copy and paste as EMF.  But if I do a copy and paste, and then take a print of the document, all the graphs and text is printed upside down, flipped back.

    Use the Pencil Tool
    alex
    adrian stock wrote:
    > How to copy and paste a single pixel
    >
    > I want to copy a single pixel and then paste it in the
    position of
    > another pixel in the same image.
    >
    > (This is in effect changing the colour of the target
    pixel, isn't it.
    > But in my case copying an existing pixel seems simpler
    than selecting a
    > colour from the swatch or using the colour picker.)
    >
    > What is the most efficient way of doing this?
    >
    > I tried to select one pixel with the marquee tool. Then
    copied it with
    > control-C, but then how do I select the target pixel and
    paste with
    > control-V?
    >
    > Thanks for your help.
    >
    > Adrian
    >

  • When installing itunes 10.7 my computer gets all the way to verifying install and then removing applications and stops.  I get a message that says "unable to complete - there is a file missing.  I tunes has not be completed.  See your package dealer

    I am trying to install iTunes 10.7.  The installation gets all the way to the end and says "removing application" then stops and gives me an error message that states there is a missing file and it cannot complete the configuration.  Please contact my support or package dealer."
    Confused - my old itunes worked fine - haven't removed any programs, etc.,
    Help

    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • HT201441 Hi Just bought ipad 2 off someone they showed it to me working and the removed it from icloud and reset. now have started to setup at home and it is asking for an apple id he or i do not know what should i do ?

    Hi Just bought ipad 2 off someone they showed it to me working and the removed it from icloud and reset. now have started to setup at home and it is asking for an apple id he or i do not know what should i do ?

    Restore the Device as New.  See Section 6 here... http://support.apple.com/kb/HT4137
    Note:
    Activation Lock in iOS 7  >  http://support.apple.com/kb/HT5818

  • I get the following message when i try to open ALL my documents : frozen panes and split panes are not supported and were removed. my documents are blank

    i get the following message when i try to open any of my documents : frozen panes and split panes are not supported and were removed. All my documents open blanc!

    Hi Louisa,
    louisa_16_za wrote:
    i work with Numbers on my MiniMac and then save the files as Excel because the university only works with Windows.
    Numbers is not an Excel clone. Importing and exporting between Numbers and Excel will eventually build up glitches.
    If the university only works with 'Windoze' it might be better if you use Excel or a free version of Office (for example, Libre Office or Open Office).
    If your marks depend upon a professor who uses Excel, go with the flow.
    http://www.howtogeek.com/187663/openoffice-vs.-libreoffice-whats-the-difference- and-which-should-you-use/
    Regards,
    Ian

  • I switched to mountain lion and from Acrobat pro 9 to 10.  now safari will not open pdf files.  acrobat preferences says it is trying to use version9 to open and i removed version 9.  any ideas?

    I switched to mountain lion and from Acrobat pro 9 to 10.  now safari will not open pdf files.  acrobat preferences says it is trying to use version9 to open and i removed version 9.  any ideas?

    Make sure you have updated Acrobat X to the latest version 10.1.3.  They updated the PDF plug-in in 10.1.1:  http://kb2.adobe.com/cps/837/cpsid_83708/attachments/Acrobat_Reader_ReleaseNote_ 10.1.1.pdf#page=4

Maybe you are looking for

  • Automating Software Updates

    Is there a way to automate Software Updates? I've finally switched my immediate relatives to Macs. But every time I visit, the operating system and other applications require several updates. Training them to manually run Software Updates is not an o

  • Change in Sales Order/Service Order is updating customer master data

    Hello Experts, Here is the change happening in CUSTOMER MASTER RECORD for very few number of cases. This we are not able to replicate, since not able to find out, in which cases it is happening. Scenario: When the user tries to change address in cust

  • Issue in Intracompany STO with Delivery and Billing

    Dear Experts,                       In Intra Company STO with Delivery and Billing, pls help to map this scenario: During PGI Supplying plant stock a/c credited. and debited to some interim a/c. During GR at receiving plant this interim a/c credited

  • Icloud dosen´t work with outlook 2013

    I can´t use icloud with outlook 2013. What can I do? Outlook crashed every time istrat icloud.

  • Steps to transfer Delimted File to Oracle Table

    Hello all, I am in the process of exploring ODI, and have installed Master and Work repositories on my machine I have to use ODI and transfer the Flat File to a oracle table. Please anybosy can help me in this, by giving the steps for same. Really ne