Timer, Threads, TableModels, and adding a row. Need Help

Ok so essentially my problem is i guess pretty simple. Skip this next part to get to the problem.
My project: I'm simply building a bell server, pretty simple. Plays a sound/recording at a specific time. It also however, grabs the times off an RSS feed; additionally it plays announcements and bells, it also automatically recalculates times if you adjust one, it ensures that all bells/announcements do not overlap; (theres some other qualities but they don't matter).
My problem: I have essentially a few different classes in my project however there are only 2 that are giving me great amounts of grief at the moment. First is my main, it calls/sets up the GUI using a JFrame, I am using DefaultTableModel as my table model for a regular JTable. The main also creates an object called SchedManager, this object is what does all of the organizing, keeping the times up and such; the SchedManager object is also a timer task which is scheduled to run every 5 seconds, every time it runs it does a few things but primarily, it checks its Vector of SchedItems to make sure none overlap and such, after that, it calls a public method of TestMain's. This method simply calls a public method of SchedManger's that returns a 2D Object array of the items, then it attempts to update the tables data by using a quick method that updates all the tables data, however obviously I may need to add a row, so I have it add a row if necessary. This is my problem though, when I call model.addRow it blows up with a nullPointerException. Heres a simplified version of my code, all this code is attempting to do is to add a row every time SubClass is ran:
TestMain.java :
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
public class TestMain extends JFrame{
    protected static Container container;
    private static JTable table;
    private static Vector data = new Vector();
    private static Vector columns = new Vector();
    public static DefaultTableModel model;
    private static SubClass sub = new SubClass();
    public static TestMain tm;
    public TestMain() {
     container = this.getContentPane();
    private static void createAndShowGUI(){
     JFrame.setDefaultLookAndFeelDecorated(true);
     JFrame frame = new JFrame("Hell's Bells");
     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     columns.add("Test");
     columns.add("Test2");
     GridBagLayout gridbag = new GridBagLayout();
     JPanel contentPane = new JPanel(gridbag);
     container.setLayout(gridbag);
     GridBagConstraints gbc = new GridBagConstraints();
     gbc.fill = gbc.BOTH;
     gbc.gridheight = 48;
     gbc.gridwidth = 60;
     gbc.gridx = 2;
     gbc.gridy = 13;
     gbc.weightx = .8;
     gbc.weighty = .6;     
     model = new DefaultTableModel(data,columns);
     table = new JTable(model);
     gridbag.setConstraints(table, gbc);
     container.add(table);
     JButton update = new JButton("update");//Creates a new button update
     ButtonListener updateButtonListener = new ButtonListener();//creates a new button listener
     update.addActionListener(updateButtonListener);
     container.add(update);
     frame.setContentPane(container);
     frame.setLocation(200,100);
     frame.pack();
     frame.setSize(new Dimension(750,800));
     frame.setVisible(true);
    public static void main(String[] args) {
        //Schedule a job for the event-dispatching thread:
        //creating and showing this application's GUI.
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
    public static void updateTable(){
     model.addRow(new Object[]{"test"});
    static class ButtonListener implements ActionListener{
     int value = 0;
     public void actionPerformed(ActionEvent e){
         String button = e.getActionCommand();
         if(button == "update"){
          System.out.println("TEST");
          model.addRow(new Object[]{"test"});
          table.setValueAt("TEST",0,0);
          if(value==3)
              table.setValueAt("TEST",0,1);
          if(value==4)
              table.setValueAt("TEST",3,0);
          if(value==5)
              table.setValueAt("TEST",2,1);
          value++;
}SubClass.java :
import java.util.*;
public class SubClass extends TimerTask{
    public static TestMain tm = new TestMain();
    public SubClass(){
     TimerTask task = this;
     Timer manager = new Timer();
     manager.schedule(task,0,5000);
    public void run(){
     //tm.model.addRow(new Object[]{"test"});
     tm.updateTable();
}Does it have something to do with JFrame? because using almost identical code but using JPanel it works fine.
All help is greatly appreciated!
Thanks In Advance,
Airplane

Whoops, sorry bout' that. Heres the error I receive:
Exception in thread "Timer-0" java.lang.NullPointerException
        at TestMain.updateTable(TestMain.java:81)
        at SubClass.run(SubClass.java:17)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)Heres the printStackTrace(); when i put the thread in a try/catch:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at TestMain.createAndShowGUI(TestMain.java:39)
        at TestMain.access$000(TestMain.java:7)
        at TestMain$1.run(TestMain.java:80)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Regards,
Airplane
Message was edited by:
Airplane

Similar Messages

  • Unable to load ITUNES onto PC HP, windows 7 Home Version.  Error message reads "Application Application Support not found".  "Unistall and reload".  I have done that 4 times on Explorer and Firefox without success.  Help??

    Unable to load ITUNES onto PC HP, windows 7 Home Version.  Error message reads "Application Application Support not found".  "Uninstall and reload".  I have done that 4 times on Explorer and Firefox without success.  Help??

    I had gotten a similar problem, except with "provider services", i believe, but i solved it by copying sqlite3.dll from E:\Program Files\Common Files\Apple\Apple Application Support to E:\Program Files\Common Files\Apple\Mobile Device Support. doing that solved my first problem, but now i have been getting the error described in this topic (unable to load dataclass info... etc.). i tried reinstalling itunes (i already had 9.1.1, and thats what i reinstalled) by using the method described on apples site (using the "remove programs" tool in the control panel) and then downloading and installing itunes. when i opened it again, i still got the same error, and just now i got an error saying "the instruction at "0x00aadb6b" referenced memory at "0x00000008". the memory could not be read" it gave me the option to cancel and debug, or to press ok and terminate the program. I tried pressing cancel, and the popup went away but nothing else happened. a minute later the popup was back, so i pressed ok and itunes quit. Upon opening Itunes again, i got the very same error. sorry for the long post, but its really been bugging me. thanks for any help you might give, and if you need anymore info, feel free to contact me.

  • I am a Windows Vista User. I updated my iTunes Version 10.3. Then, when I re-opened my iTunes, all files were gone! Good thing I consolidated the files and just imported the files again. But, this happens every time I close and open my iTunes. Help?

    I am a Windows Vista User. I updated my iTunes Version 10.3. Then, when I re-opened my iTunes, all files were gone! Good thing I consolidated the files and just imported the files again. But, this happens every time I close and open my iTunes. Help?

    In iTunes 11 uncheck the preferences setting in in the iTunes Preferences panel "Advanced > Copy Files to iTunes Media folder when adding to Library"

  • When setting up my hubby's new phone to itunes, I have somehow merged the 2 itunes accounts together and now itunes is not responding to my phone and all of my info has synced onto my hubby's phone wiping all of his info and adding mine...Help!!

    I have an Itunes account already set up, when setting up my hubby's new phone to itunes, I have somehow merged the 2 itunes accounts together and now itunes is not responding to my phone and all of my info has synced onto my hubby's phone wiping all of his info and adding mine...Help!!

    If her data was not backed up or synced to something, it's gone. Sorry.

  • My Iphone 4s is not being recognized by itunes at all. There is no connection, the cable i am using is not the problem because itunes will recognize my Ipad2 and Ipod thru it. I have the most current itunes and phone software I need help!

    My Ihone 4s is not being recognized by Itunes.There seems to be  no connection, the cable i am using is not the problem because itunes will recognize my Ipad2 and Ipod thru it. I have the most current itunes and phone software I need help!

    Thank you allan this worked, the final thing was updating the driver softwar for the AMDS in device manager. Thanks again.

  • HT4946 hii, on my iphone 4s, i tried upgrading my OS and i was asked if i needed back up and i said yes, after upgrading i couldnt find any of my files, document, pictures, music and all. please i need help please.

    hii, on my iphone 4s, i tried upgrading my OS and i was asked if i needed back up and i said yes, after upgrading i couldnt find any of my files, document, pictures, music and all. please i need help please.

    Hi,
    usually when you upgrade, it should not delete your files, but if it happens, than you should have a backup.
    Unfortunately it is very common, that people don't know, what exactly is in the backup.
    The question is, what files exactly you are missing? Own pictures, or taken with the device? Purchased music form the iTunes Store, or own? ....
    Documents and files are mostly up to the developer of the app, if they are part of the backup, usually not and you need to transfer them before.
    In the backup you will find just pictures from the Camera Rolle folder, everything else you should have on the PC, if you had it on the device.
    Same then for music, you can transfer purchased music from the device, but your own works just one direction, from PC to device, from device to PC it doesn't work.
    In future I recomand you to be sure how the backup works or use a 3rd party app (iExplorer) where you have a little bit more "freedome" than with iTunes.
    Or you maybe just restored from the worng backup

  • I bought apps from apps store,my money was taken and den I downloaded the pass buh 2 didn't work .it told me iTunes failed to install app,the apps were the dark knight rises(batman) and asphalt 7 I need help plss am using iPad 2

    bought apps from apps store,my money was taken and den I downloaded the apps buh 2 didn't work .it told me iTunes failed to install app,the apps are the dark knight rises(batman) and asphalt 7 I need help plss am using iPad 2

    Although iTune terms says that all sales are final. You can try explaining to get a refund.
    http://www.apple.com/support/itunes/contact/

  • Time Machine backup and main drive corrupted. Help! (REWARD OFFERED)

    Here's the deal:
    I have a Macbook Pro and a Mac Mini both runnign Snow Leopard. I use the Mac Mini as a kind of media center / server, it has a few external drives connected to it. On of these drives (1GB) is dedicated to Time Machine, the Mac Mini (80 GB hard drive) backs up to it directly and the Macbook Pro (500 GB hard drive) does it over the network (Time Machine created a sparsebundle). This has worked well for years now. Occasionally I got the error that Time Machine needed to start a new backup because the old one was corrupt. That happened about 2-3 times a year (did the same thing when I backued up via USB). Now about 2 weeks ago, that error came up and I just let the Macbook Pro on overnight and connected the ethernet cable for faster transfer.
    When I woke up, the Macbook Pro didn't respont at all, spinning beachball, no response at all beside mouse movement. I let it do it's thing for another 10 hours (while I was at work) and just held down the power button to power off and restart it. But all I got was the gray-on-gray flashing folder with the question mark in it, that's what you get when the Mac can't find bootable partitions. So I popped in the OSX Snow Leopard install disk, ran disk utility. It saw the hard drive, but no partition (i.e. Machintosh HD) on it. I checked the Time Machine backup and the sparsebundle was 300 GB (the Macbook Pro had 400 GB used, the remaining 100 GB were free). There is no way to restore from an unfinished Time Machine backup...
    First thing I did was clone the internal (Macbook Pro) hard drive to a DMG disk image using DiskDrill (the only program I found that could recognize the drive at all, not even DiskWarrior could). I also bought the exact same hard drive model and partitioned it like the cloned the corrupted hard drive to the new one using ddrescue (a command line tool that doesn't quit upon i/o errors but proceeds and tries to recover as much as it can). It copied everything except 65 kilobytes, the corrupted drive seemed to be physically damaged in a bunch of sectors relatively at the beginning of the disk. Since I had now an exact copy on a fresh, healthy drive, I went crazy trying out Disk Warrior (didn't recognize the drive at all), data rescue, testdisc, p a Windows isk, etc. Only R-Studio (on windows) showed the EFI and Macintosh HD partitions on there, they started and ended on the same sectors on the corrupted drive and its clone. After some research, I figured that the partition table was corrupt so I reformated the clone disk using the OSX Snow Leopard install disk (1 HFS Journaled Partition with GUID Partition table). R-Studio showed the EFI and Macintosh HD on that reformated drive, again, same sectors as before. So I figured I could just copy just the bytes where the Macintosh HD starts from the corrupted drive to the clone (using ddrescue). That worked, after almost 24 hours, I had the clone drive with a "disk1" partition on it that even disk utility could see.
    Now I was able to run Disk Warrior on it, but all it could do was recover a few Application folders (Resource-Folders and lproj-stuff), about 100 MB in total. It couldn't repair more of catalog file apparently. Luckily, Time Machine backed up quite a bit (300 GB out of 400 GB of data) and I was able to manually copy all the Dokuments, Desktop, user Library, Applications, Music, Download and Movies. Unfortunatley, only a little bit of the Pictures folder was copied. iPhoto library (80 to 100 GB) was nowhere to be found, backup must have failed right then. I can salvage the drives (time machine drive, original hard drive with a few broken sectors, DMG-image of that drive, 1-1 copy of that drive with partition table repaired) but that only gives me files with numeric names and today's date on teh JPEGs (instead of the date the picture was taken).
    Is there any way I can recover that iPhoto library? It appears the catalog file got corrupted because the hard drive (only 8 months old...) failed on a few sectors. If I understand it correctly, the catalog file on HFS+ file systems is where the folder structure and file names are stored in a B-Tree. I can't imagine that some i/o error during backup can totally annihilate that file when it was working perfectly before. Here's a few things I want to try out but haven't figured out how so far:
    - Time Machine had to start a new backup. There's plenty of free space on that drive so there's a good chance there's old data left on it. Is there a way to restore files (including file names) and fodlers from deleted time machine backups?
    - Is there any way to re-build that catalog file from what is there left on the original hard drive? I can't imagine 65 kilobytes destroys it all.
    - Are there other ways to recover my iPhoto Library? The raw JPEG (and AVI) files with correct file names or metadata would suffice.
    Thanks in advance for any help, I'll actually reward the person with a working solution, 5 years of photo memories are somewhat important. It really ***** that a failure during a backup destroys that...

    Final Update:
    The catalog file on the original hard drive could not be fixed. Seems like Mac OSX tried to repair the catalog file while the sectors this file resides on failed. To make things worse the partition table was also broken beyond repair, even overwriting the sectors with a new correct partition table didn't help. DiskWarrior found less then 100 MB worth of stuff, mainly Applications folders.
    I recovered pretty much everything from the incomplete Time Machine backup by right-clicking the sparsebundle and browsing through the folders with the long alphanumeric names, looking for the version of the folder with the most files in there. All I was missing was part of the ~/Pictures folder, i.e. photobooth pictures and the whole iPhoto Library. My best option was to recover these files using data recovery tools.
    DiskDrill proved to be the absolute best, fast, responsive, efficient, and the only one able to mount the DMG-file with no valid file system on it. As there were many i/o errors and broken sectors on the original hard drive, I made a copy of it using a free command line tool called ddrescue (the standard dd tool just aborted when it encountered the i/o error). ddrescue copied the whole drive to a DMG image, I had 56 kilobytes with errors on the first pass, but it managed to shrink that down to just 4 kilobytes (wow!) after the second pass where it tries to re-read the broken secors. It took about 24 hours for a 512 GB 2.5" drive (5400 rpm) but well worth it. Be advised that ddrescue is really persistent and tries everything to recover those last errorneous bytes. At the very end of the process, the read/write head of the hard drive just goes wild trying to catch the data on the sectors with different momentum. This works but I assume this is pretty damaging for the original drive. I also copied it all to a new hard drive (again using ddrescue) and tried partition and catalog repair tools on that (DiskWarrion, testdiks, pdisk, etc.). Still no hint of a good result.
    I made a deep scan on the clone hard drive with DiskDrill. At the end (after about 8 hours over USB) it found 13 partition (I assume that's the Macintosh HD, EFI and some DMG files lying around) and  hundreds of thousands of pictures. I restored some JPG files just to check the quality, some were damaged, some were good with all the EXIF data intact. I just made it copy all JPG files into a folder. I know the pictures taken from my camera produce JPGs larger than 1 MB and smaller than 5 MB, so I sorted them by size and moved the smaller and larger files into seperate folders. I took the remaining folder (100 GB) and just dragged it into iPhoto. It imported them overnight. Auto-Split by events and I got my library back, alas with different file names, originals and edited versions side by side, lots of duplicates, some damaged, some not. But hey, all the pictures in chronological order. Okay there was also one large event with all the JPGs without valid EXIF data landed inside, iPhoto just takes the file creation date (i.e. the date where the recovered file was copied). As far as I can tell, these are all just data corpses, halfway overwritten copies, random pictures from the internet, desktop pictures, etc.
    I started to work my way back through the events, deleting the duplicates and renaming the events. There's an app called "Duplicate Annihilator" which apparently can find duplicate pictures in iPhoto and mark them for you. The free version only does 500 pictures but if it works, I'll get the full version. It can mark th eduplicate photos by adding something to the picture comment in iPhoto so you can manually review it all. Good stuff!

  • The item referred to by this shortcut cannot be accessed. you may not have the appropriate permissions, this erroe message i get every time i try to access iTunes, I need help.

    I have been having this problem for few weeks I tried to unistall it and reinstall it still didn't work I also tried to delet the shortcut by draging it to Recyle bin and find the iTunes through the c drive and send the icon or even open it from there still didn't work so I really need help here.
    Thank you

    Ok. seems like I am in bigger problem than what i thought..So i did what you asked me and here is the log from the scan
    Malwarebytes Anti-Malware (Trial) 1.62.0.1300
    www.malwarebytes.org
    Database version: v2012.07.25.04
    Windows 7 Service Pack 1 x64 NTFS
    Internet Explorer 9.0.8112.16421
    [administrator
    Protection: Enabled
    7/25/2012 8:34:03 PM
    mbam-log-2012-07-25 (20-42-53).txt
    Scan type: Quick scan
    Scan options enabled: Memory | Startup | Registry | File System | Heuristics/Extra | Heuristics/Shuriken | PUP | PUM
    Scan options disabled: P2P
    Objects scanned: 239337
    Time elapsed: 7 minute(s), 52 second(s)
    Memory Processes Detected: 0
    (No malicious items detected)
    Memory Modules Detected: 0
    (No malicious items detected)
    Registry Keys Detected: 1
    HKLM\SOFTWARE\Google\chrome\Extensions\fdloijijlkoblmigdofommgnheckmaki (PUP.Funmoods) -> No action taken.
    Registry Values Detected: 0
    (No malicious items detected)
    Registry Data Items Detected: 0
    (No malicious items detected)
    Folders Detected: 0
    (No malicious items detected)
    Files Detected: 3
    C:\Users\mer\Downloads\7zip_Setup.exe (PUP.Bundle.Installer.OI) -> No action taken.
    C:\Users\mer\Downloads\Setup.exe (PUP.Bundle.Installer.OI) -> No action taken.
    C:\Users\mer\Downloads\SoftonicDownloader_for_mkv-player.exe (PUP.ToolbarDownloader) -> No action taken.
    So I removed everything and did the restart but still didn't work, the I used Microsoft Security Essentials and find this one: TrojanDownloader:ASX/Wimad.DS and the alert level was severe so I removed too and the problem was still there even after restarting the computer, Now I am kinda lost and I dont Know what to do.

  • My computer freezes and stops working I NEED HELP FAST I bought it 3 days ago from BestBuy brand new

    my computer i bought 3 days ago from BestBuy brand new in the box freezes and stops working or not responding and lags all the time and i always have to push the power button on the computer for me to restart it because i cant do anything on my computer i cant use ctrl + alt + del or click on anything and i spent $965 on my HP Pavilion HPE Series h8-1224 computer with 10GB ram and 2TB HDD and 1024MB Video memory with windows 7 home premium 64bit...I need help on how to stop my computer from freezing up or lagging or not responding all the time because i dont know what program i installed last before it happened or what i did wrong i dont know i just want my pc running perfect forever 

    I did the First step and reinstalled everything and then its starting to happen again everytime i right click on the desktop or type anything or do anything on my desktop it freezes up or lags or the whole intire scrren goes away and all i see is my wallpaper on my computer and i try press Ctrl + Alt + Del it takes long then it says could not start Ctrl + Alt + Del and i try pressing Ctrl + Shift + Esc for task manager it that doesnt come up man i had it for 10 days now **bleep** is wrong with this new desktop cuz i had another HP desktop for 6 years then it died on me but this computer only 10 days and im already having problems what els can i do i already restored my pc and it formated my 2TB hard drive this gotta stop man its pissing me off i cant do anything

  • Extreme render time compressor ProRes (LT) to H.264. need help.

    I have a 24 minute project that I'd like to export from FCP7 using Compressor 3.
    Currently, the estimated time to completionis 12 hours and 36 minutes and increasing.
    and (according to my Activity Monitor) Compressor is using ~375% of the CPU.
    i am frustrated.
    I shot with a Canon Rebel T2i @ 720p/60
    All video files were converted to ProRes422 (LT) before editing.
    Using a 27' iMac w/ 2.93 GHz i7
    I will be uploading the compressed file to vimeo, whose Compressor settings recommendations i have used and are as follows:
    extension: .mov
    Audio encoder: AAC, stereo, 44.100 kHz
    Video Encoder:
    format: QT
    W: 1280
    H:720
    Pixel aspect ratio: square
    crop: none
    padding: none
    Frame rate: (100% of source)
           selected: 60
    frame controls: off
    codec type: H.264
    multi-pass: on, frame reorder: on
    pixel depth: 24
    spatial quality: 75
    min. spatial quality: 75
    key frame interval: 30
    temporal quality: 50
    min. temporal quality: 25
    average data rate: 5.12 mbps
    every time i try to export with these settings, it takes upwards of 12 hours, and the only time a project has completed, the video file is over 5 hours long and more than 5 gb.
    i would be delighted if anyone can provide insight and direction in how i can more effectively prepare my video for uploading to the internet.
    thanks
    andrew

    Have you tried setting up a cluster using qmaster in system preferences and submitting to the cluster in compressor.  That can speed things up enormously.  Check out the manual and do some searching here on how to setup.  If you can't figure it out, post back and I'll try to help.
    If you need to do this regularly, I think Matrox makes a hardware solution that speeds up h264 exports.
    http://www.matrox.com/video/en/home/

  • Timer does not expire as it should, need help

    I am developing an application that plays multiple sound
    files at different time offsets. For example, snd1 starts at time
    offset 0 and snd2 starts at time offset 3000 ms (3 sec). I have
    created a timer for each sound file and enabled the handlers via
    addEventListener() function. The sound files start playing at the
    correct time offsets but I encounter a problem after the timer has
    been stopped because the user pressed the Pause Button. When the
    user presses the Play Button, the timer seems to be reset because
    the onTimerComplete() function is triggered after an additional
    3000 ms (3 sec). Is this normal behavior? If this is not the
    correct behavior, is there a solution to accomplish what I need
    done? Any help would be appreciated.
    I have created a small application in Flash CS3 that depicts
    the problem with just a single sound file. I have Flash Player
    9.0.124.0 installed. Sample code is below.
    Thanks,
    NGP

    Hello, pakie1. 
    Thank you for visiting Apple Support Communities.
    Here is a troubleshooting article that you may find helpful when experiencing keyboard issues.
    One or more keys on the keyboard do not respond
    http://support.apple.com/kb/ts1381
    Cheers,
    Jason H.

  • I forgotten my bit locker password and recovery key.i need help .................

    i lost my bit locker password and i lost recovery key,i need help ..please help ......such important things are there in my e drive....pls mail me [email address redacted]

    Unfortunately if you lose the password and the recovery key you are not able to decrypt and access the information, that is the sole purpose of BitLocker.
    Blogging about Windows for IT pros at
    www.theexperienceblog.com

  • External hard drives and mac/windows compatibility - Need Help pls

    I have an external Harddiskdrive with 200 GB formatted in HFS+ with my Mac.
    And here's my Problem:
    A friend of me would have some of the MP3's on this HDD, but he is a PC user with Windows XP. So he could not see the drive in his Workspace.
    Is there a way without buy MacDrive or something like that?
    Or is there a App like MacDrive as Freeware or OpenSource???
    What is with the "DOS" - format (FAT32)? Can I use this without an afraid of losing my Data on this Drive???

    "am getting this error message on my Mac:
    SMART status not supported"
    This is not an error. SMART status reports of hard drives are not passed through the chipsets of external enclosures.
    "What is this FAT program and how do I make it work? "
    FAT is not a program. IT's the format in which the drive is fomatted.
    In the future, please start a new question about your issues, so as to not "thread-jack" and existing discussion. YOu'll recieve more repsonses if do so as well, rather than burying your question deep inside someone elses topic/issues.

  • SQL Query : sum only numbers in row - need help

    Pls see data below. I would like to display only 8 rows and BRH CCN rows should be merged together and displayed as - BRH 98 2 instead of 2 rows. The rest of the rows should remain as is. Please help.
    CCN     SERVICES     MANUFACTURING
    ASL     138     NA
    BRH     98     NA
    BRH     NA     2
    C10000     NA     0
    C40000     NA     0
    DAO     NA     10
    E10000     NA     0
    I10000     NA     0
    M10000     NA     0
    Edited by: auxilia on Nov 7, 2009 6:25 AM

    with t as (
               select 'ASL' ccn,'138' services,'NA' manufacturing from dual union all
               select 'BRH','98','NA' from dual union all
               select 'BRH','NA','2' from dual union all
               select 'C10000','NA','0' from dual union all
               select 'C40000','NA','0' from dual union all
               select 'DAO','NA','10' from dual union all
               select 'E10000','NA','0' from dual union all
               select 'I10000','NA','0' from dual union all
               select 'M10000','NA','0' from dual
    select  ccn,
            nvl(max(case services when 'NA' then null else services end),'NA') services,
            nvl(max(case manufacturing when 'NA' then null else manufacturing end),'NA') manufacturing
      from  t
      group by ccn
    CCN    SERVICES             MANUFACTURING
    E10000 NA                   0
    C10000 NA                   0
    BRH    98                   2
    M10000 NA                   0
    C40000 NA                   0
    ASL    138                  NA
    I10000 NA                   0
    DAO    NA                   10
    8 rows selected.
    SQL>   SY.
    Edited by: Solomon Yakobson on Nov 7, 2009 6:46 AM

Maybe you are looking for