Should be easy...

Hi,
Let's say I have a table with 3 columns - name, date, and result.
Here is an example:
Name Date1 Result
John 7/3/05 45.23
Jill 7/2/05 51.33
I want to create a view where a "calculated-field" is created which simply indicates 1 if the result is greater than or equal to 50 or 0 if less than 50. I don't think I can use DECODE for this, can I?
I'm thinking something along the following:
select name,date1,result,decode(result,>=50,1,0) from table;
I don't think this will work though, any other ideas??? Thanks

If you have 9i, it may be clearer to use a CASE statement
SELECT name,
       date1,
       result,
       (CASE WHEN result >= 50
             THEN 1
             ELSE 0
         END)
  FROM <<table name>>Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • This should be easy! How can I change the background colour of my fields?

    Apologies if this has already been posted but nothing has come up via Google nor the Forum search.
    I'm sure this should be easy but it's really doing my head in!
    I have a number of textboxes, dropdown lists, etc within my form - I have set Custom backgrounds on each which are visible within Design View. However, in Preview PDF all the fields have a default blue colour and only change to my Custom backgrounds when you enter the field.
    Is there a way of removing the default colouring of fields so that it's the same as my Custom backgrounds? My Custom backgrounds are 'linear to bottom' so I don't want to just set border.fill.color to one colour.
    Thanks for any help,

    Hi,
    If you include this Javascript in the docReady event of the root node (default "form1").
    app.runtimeHighlight = false;
    This will turn off the field highlight. It doesn't prevent the user from turning back on the highlight, but it will mean that your form opens with the highlight off.
    Hope that helps,
    Niall
    Assure Dynamics

  • It should be easier to change the default copyright company in Application Builder

    It should be easier to change the default copyright company in Application Builder.  
    I got the following from NI support to change the name of the company that is copyrighting the software.
    1. To show the desired hidden folder, you must select Tools>> Folder Options >> View >> Under 'Files and Folders'>> 'Hidden files and folders' >> check the 'Show hidden files, folders, or drives' >> Select 'ok'
    2. Navigate to C:\ProgramData
    3. Open ProgramData >> National Instruments >> LVProductDLLInfo >> 12.0.0 >>LabVIEW_ADE_120000.ini   ***Please note that the folder 12.0.0 may instead be 14.1.0 or another numeric value based on which version of LabVIEW you are using***
    4. Change the RegisteredOrganization and RegisteredOwner to the appropriate organization and owner respectively.
    The fix NI support sent me was to change the name of the current software owner.
    The company that owns the software is usually writing the program for another company that is paying to have it developed. If the software owner is not careful they may assign the copyright to their company or to the company that they developed software for last.   I am sure that the company that had software developed will be surprised if their name is not listed as the legal copyright owner.
    Stan

    I've found it now (sheepishly). It is a parameter defined in Home->Application Builder->Application 693->Application Attributes->Edit Definition. I thought it was using the database nls parameters, but it isnt. So I simply had to change the parameter value from $ to £.

  • List as a return type (Should be easy!?)

    Hi all,
    I'm pulling my hair out at this as it sounds like it should be easy. The method below should return a List. What am I doing wrong please?
    (This is making me feel thick, any help would be very much appreciated)
    Thank you,
    David.
        public String[] getHrefs(String uriStr) {
              List resultList = new ArrayList();
              HTMLDocument.Iterator it = null;
              Reader rd = null;
              try {
                   // Create a reader on the HTML content
                   URL url = new URI(uriStr).toURL();
                   URLConnection conn = url.openConnection();
                   rd = new InputStreamReader(conn.getInputStream());
              } catch (Exception e) {
                   System.out.println(e.toString());
              try {
                   // Parse the HTML
                   EditorKit kit = new HTMLEditorKit();
                   HTMLDocument doc = (HTMLDocument) kit.createDefaultDocument();
                   doc.putProperty("IgnoreCharsetDirective", new Boolean(true));
                   kit.read(rd, doc, 0);
                   // Find all the A elements in the HTML document
                   it = doc.getIterator(HTML.Tag.A);
              } catch (Exception e) {
                   System.out.println(e.toString());
              while ((it != null) && it.isValid()) {
                   try {
                        SimpleAttributeSet s = (SimpleAttributeSet) it.getAttributes();
                        if (s != null) {
                             String link = (String) s.getAttribute(HTML.Attribute.HREF);
                             // If link valid, add it to the result list
                             if (link != null)
                                  resultList.add(link);
                        it.next();
                   } catch (Exception e) {
                        System.out.println(e.toString() + " : Skipping");
                        it.next();
              } // end While
              //     place all found links in array
              resultList.toArray(new String[resultList.size()]);
              // return array
              return resultList;
        }

    resultList.toArray(new String[resultList.size()]);In that code, you are not storing the result of the 'toArray()' method which is the array that you wanted. If you look at the API of ArrayList's toArray() method, it said::
    Parameters:
    a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
    Returns:
    an array containing the elements of the list.
    So the result will not be stored in the array given as the parameter, instead it is stored in resulting array that is returned by the method (regardless of whether or not the parameter array is used). What you want to do is ::
    String[] result = resultList.toArray(new String[resultList.size()]);
    return result;or as GiddingsR replied, simply:
    return resultList.toArray(new String[resultList.size()]);

  • HELP! I have a work deadline and this should be easy!

    I am at work-big presentation tomorrow-someone sent me an Indesign file and I can't cut and paste the image from indesign to power point. I am selecting the image-right clicking copy and pasting and nothing is working. I have tried to export the image and I can't even do that! I am NEW to indesign-anything that I am missing that is obvious-please let me know!
    Thanks!!!!!

    Thanks for the input. I know PowerPoint really well, but I'm trying to make InDesign documents now for the office. They want me to create great presentations, but Powerpoint is just a horrible application. I was trying to see if there was a way to convert between InDesign and PPT, just so I could use a better application to lay things out and then import it into PowerPoint so other users could work with it.
    Easier said than done.
    The best way I've seen is to follow these steps (I'm using InDesign and Illustrator CS2 and Powerpoint 2002):
    - First, you need to make an InDesign file (where you're doing your designing) and a blank Illustrator file set to the dimensions of a PowerPoint slide (which is 10 x 7.5)
    - After designing your presentation in InDesign, select all the elements on one page (CTRL + A)
    - Copy and paste those elements into your blank Illustrator file
    - Select File > Save For Web
    - Choose PNG and mark the checkbox for transparency
    - Click on the "Image Size" tab
    - Mark the checkbox for antialiasing
    - Increase the scale of the image to about 132%.
    - Save it
    - Paste it into PowerPoint (I like to drag it from my desktop and drop it into the slide)
    - The image you made should fit your powerpoint slide. I don't know why you have to increase the scale of the PNG file when your Illustrator file is the same size as the PPT slide, you just do. You will probably have to still reduce the size of your image slightly, but the resolution should be sharp.
    - Repeat these steps for all the other pages of your InDesign document
    The resolution, typography, and layout of everything is decent, however, there are a lot of drawbacks to this method. Your customer can't edit any text elements because they're all PNG files. You also can't animate each element separately (unless you only chose to export only a selection to PNG from Illustrator, then animate that piece).
    I'm pretty disappointed that there's not direct way to do this that will let the end users of PowerPoint regain control of the document to edit it or change animations, etc. I really hate PowerPoint.

  • HELP regarding making password work for wireless setup. should be easy...

    Hi. i have read and tried everything. I am using a Linksys BEFW11S4 wireless access point router. Firmware version 1.44.2. i am trying to set it up so if someone wants to wirelessly use the internet (laptops, etc), they would need a password. should be simple, but its being frustrating...
    i have tried to set the WEP to mandatory and set the passphrase to something and then when i try it out on my mac laptop, it doesnt work. i also tried doing line 1 of the key codes it generates and that didnt work either. this is per instructions.
    i would grealy appreciate if someone could help me in this problem. i just want to be able to secure my wireless network so the only people in the apartment building that can use our internet would be me and my roommate on our laptops. thanks.

    hi gizzy, what i ended up doing was making it 128 bit under wep and it gave me a code which was pretty long. then when using my mac, for wireless type on the network i chose 128 bit hex. i typed in the code that was generated for me and it ended up working to make my wireless secure. unfortunately its not some easy password i can remember, but it worked. i just had to write it down. let me know if this works for you. also, if there is anyone else out there who knows how i can make it an easy password that i can remember and have it work, please let me know.

  • This should be easy ;O) How do I read the exif info in a JPG file?

    Hey all...
    I have been googling this for awhile now with not much luck.
    !st... Hi... I am a Flex AS3 newbie....  but... not a programming newbie...
    My learning project is to create my photoart gallery as a Before and After gallery. Part one is a Flex/Air app to gather the images, scale them to consistant display and thumbnail sizes and build and edit XML data files for the images and galleies. I have actually gotten most of that done..
    I am currently working on editing the XML files for the image information (photographer info, copywrite info, descriptions, gallery...etc.) and pulling in as much information that I can find in the image file itself. That being EXIF data.
    I have found a couple of examples but for the XResolution and Yresolution I just keep getting 72dpi... now the Jpg files that I am using from my camera.. when I look at the properties with Windows XP... it say 300dpi... when I load the image in Photoshop and look at image size it says 300dpi.. in Photoshop if I look at file information the EXIF says 300dpi....
    How can I access that data with Flex/AS3????? After all this is "Adobe" Flex Builder...
    This just seems like it should have been solved ages ago... Please.. point to the right path  ;O)
    I have searched this forum and have found one or two EXIF references, but no answers.
    Thanks for any guidance on the subject.
    Bob Galka

    Jean-Pierre
    Thanks very much for your quick response.
    One last point and we should drop this in favor of other more urgent issues we both ahve to deal with.
    The data is coming from a comma delimited (CSV) file using a comma ',' and optional quotes (") as field separators.
    The first column of 'good' data is read as an INTEGER EXTERNAL because of course it is a number. However, the 'bad' rows I want to eliminate have character text in them where I would normally find numbers and they all start with 'D','M' or 'S'.
    I don't have an actual column in the data file or resulting table definition that represents that first character that I'm trying to test on. Hence my use of (1) to reporesent the 1st character of data on the line regardless of whether its numeric or character.
    As I stated, the syntax works fine in SQL*Loader when I typed the WHEN clause in manually.
    I guess if there was a way to define a pseudo column that could be defined using the POSITION notation and everything else using the variable length delimited notation I could test on that psuedo column. I don't want the pseudo column to appear in my resulting table so that seems to be an issue. Enough.
    Since I've worked around it using external tables for this issue I'm not going to spend any more time on it today.
    As usual, many thanks for your help.
    Have a great day! I'll be back soon with another issue :-)>
    Gary

  • How to pair an apple TV with an Apple key board ?? Should be easy but ???

    Hi out there...
    Ive just bought an Apple TV and because I already have a Mac needed to buy a new key board to pair them up...but it's not happening !
    So have a wasted $89.00 Aus for nothing because it should be fairly straight forward
    Cheer Sal

    If you have a recent model Apple wireless keyboard you should be able to pair it with the ATV very easily. Apple's Apple TV: Using the Apple Wireless Keyboard provides step by step instructions for doing this & a troubleshooting section if you encounter any problems.
    In particular, note the "not paired or connected to another device" troubleshooting item. That was a "gotcha" for me because I had forgotten that I had paired my wireless keyboard with my iPhone to show someone how that works. Oops!
    If you need to unpair your keyboard, you do that from the device it is currently paired with.

  • Should be easy but how? --Getting objectClass

    Bare with my simple question =). How do I get the schema listing of the objectClass types? I.E. I have the following:
    cn=Brian Van,o=Home
    objectClass=top
    objectClass=person
    objectClass=organizationalPerson
    objectClass=inetOrgPerson
    cn=Brian Van
    sn=Van
    How do I pull just the objectClasses of "top", "person", "organizationPerson", and "inetOrgPerson" to enum through or something? I've tried DirContext listObjClasses = ctx.getSchemaClassDefinition(dn); but am getting errors (i don't think this is the right way). Thanks!

    Not sure about what you asked but...
            DirContext objClasses = m_Ctx.getSchemaClassDefinition("o=bar,cn=foo");
            NamingEnumeration enum = objClasses.search("", null);
            while (enum.hasMore()) {
                SearchResult r = (SearchResult)enum.next();           
                System.out.println(r.getName());
            }Should enumerate objectClass attributes of object "o=bar,cn=foo".
    If you want to enumerate all possible objectClass definitions that exist in
    your schema, just bind to schema object and list its attributes.
    Kulervo

  • Project File Help! (Should be easy)

    Im not well aware with Illustrator but I believe the community here should be able to help.
    I need help breaking off the part circled in green to match the original file. I used the ellipse tool along with some pathfinders to get to where Im at,now I'm stuck as to how to break it off.
    Any ideas?
    Here is a screenshot of my work space if it may help..

    Ashab,
    Another approach, for greater/full accuracy of especially the semicircular parts, working on top of the locked original, starting with stroked paths (no fill) where the Stroke Weight is identical to the width of the original final paths (Smart Guides are your friends):
    1) Create four full concentric circles with the Ellipse Tool corresponding the more or less half circles;
    2) ShiftClickDrag with the Line Segment Tool between the outermost Anchor Points of the largest circle, then Object>Path>Divide Objects Below, then delete the lower halves;
    3) Lock the smallest circle and ShiftClickDrag with the Line Segment Tool across the second smallest circle where it is to be cut (four places symmetrically) and delete the three unwanted bits; this will give the right angles of the cuts;
    4) Create the straight bottom path half a Stroke Weight under the half circles so the strokes touch:
    5) Select everything and Object>Path>Outline Stroke to get closed filled unstroked paths;
    6) Lock the two smallest circles and ShiftClickDrag with the Line Segment Tool across and beyond the two largest circles in both sides where they are to be cut, then Object>Path>Divide Objects Below, then delete the lower unwanted bits (three out of four), then select the second largest circle and the remaining bit and Pathfinder>Unite; this will give the right angle here;
    7) Select the straight bottom path and the relevant circle parts (just ClickDrag across with the selection Tool) and Pthfinder>Unite.
    That should do it.

  • Bootcamp Woes...Should be easy for you pros

    Alright I'm gonna break this down as simple as possible
    1)  I had two partitions one large mac partition and one 80GB windows 7 partition.  I tried to shrink my mac side and it created and empty space pushing the windows partition from number 4 partition to number 5.
    2)  I found a discussion on here using gdisc and I guess it moved 5 to 1 or made it look that way and did something to the MBR.  I followed someones example.  This brought my windows partition back but made my mac side disappear...and I know its still in there lurking.
    3)  Ive tried several utilities and tools.  Some found the files but I need to actually boot the mac side to make a recovery ( I want my applications and everything)  If I could just boot it one more time to make a recovery image then I could wipe my whole computer and start over.
    4)  The closest I got to finding the best information but I still didnt want to fix it was disk-boot-repair by sourceforge.  Keep in mind that I can ONLY access windows at the moment.  So don't even mention a mac side related solution....believe me I wish it was this simple.
    Below are the images (excuse my crappy pictures) from the disk-boot-repair  you can see that it sees the mac osx and something just isnt lined up right.  The disk-boot-repair won't fix it because it found an EMI.  Which I think is a good thing because I need that right?
    Forgive me for sounding like a newb through all this but I got myself into this mess and I plan on fixing it and I'm learning along the way.  Any help and I would be forever grateful.
    Robbie

    I appreciate your effort but I'm not even sure you read my post.  I know now thats what I should have done and I messed up.
    Now I'm trying to fix it.  My mac files still exist somewhere on my hard drive.  I just cant get it to boot because when I used gdisk it changed my partition numbers, MBR, etc.
    I just need my mac to boot one more time to make a backup or figure out how to access the files enough to make a backup that I can restore.  Then I will wipe hard drive, re-install.  Use bootcamp assit.  Restore windows and restore mac files.
    I have too many important files to let this slide.  This is why I'm going to all this effort.  Using all these tools to try and get it to boot one more time.  Should I have made a backup when I could still get the mac side to boot yes.  But I know its all still there somewhere just not pointed in the right place when I try to boot.
    Thanks

  • I know this should be easy, BUT IT'S NOT!!  help!

    Hey everyone,
    I decided to swallow some pride and find some solution to my situation that should be simple. I've looked on many of the threads and still can't seem to find the solution.
    I am just trying to set up my Airport Express to my Powermac G5. Very simple... just want to run the ethernet through the Express from another room.
    I started by plugging in my Express. That was fine, I got a green light. Then when to Setup Assistant... it cannot find a network. After many attempts, still no network. I tried to reset my Express. No luck. I also configured my Express directly to my Powermac, all settings seemed just fine... except when I try to use it how it is supposed to be used, I get nothing. My G5 is reading my Extreme Card okay. So... what in the world am I doing wrong?
    Admittedly, I am no tech whiz when it comes to networking, so naturally, I assumed that this would be a simple and quick installation... that has seemed to last for hours and hours...
    Powermac Dual 2Gh G5, 4G RAM   Mac OS X (10.3.9)  

    Hi
    I had the same or similar problem when I first hooked up my airport. I took my computer to the Apple store to be sure my airport setup was correct. When they turned on my computer it immediately connected to their network. They had no idea why it wouldn't work at home. I was lucky that a person was standing there that had an idea what was wrong. He said it was possible that there was some interference in my home. So, the apple people suggested that I change from automatic to a specific channel. That was fine, except I asked them how could I do that if the computer didn't recognize the base station? So, we then tried hooking the base station up directly to the computer using an ethernet cable, and it worked (they had never tried this). When I got home I did this and changed the channel to 2 (you have about 10 or so channels you can try). I then put the base station back to the room where my cable is. The computer immediately recognized it. I now have three airport extremes in various rooms and they all work great, as long as I set them to a specific channel. You can try each channel and then check the strength of the signal to determine which is the best for your environment.
    Hope this helps.
    Larry

  • L10: Deleting folders - should be easy or is it?

    Hi ive just brought a new satalite L10 and im having a problem with it. I cannot do the simplest thing - when i create a new folder on my desktop or document folder and try to rename it or delete it - it wont work and the whole laptop freezes!!! Considering its brand new this should not be a problem!!!! Any suggestions????

    Hi
    Its a strange issue. I have never heard that after deleting a folder the notebook freezes.
    Did you try to recover the OS?
    I heard about an issue, after opening an html document the notebook went down. In this case the mainboard had a fault.
    Well. At first you can try to recover you system if it doesnt work I propose to contact the service partner.
    Bye

  • Website tool help - seems like it should be easy

    I'm not exactly new, but it's been a long time since I've used Java.
    I want to create a page with a list of upcoming events that is sortable by the date as well as the state it's being held in, and I want the events to have unlimited room for descriptions, something like this:
    Arkansas
    Happy hula dance competition! 9-14-2005, Little Rock, Arkansas.
    Karaoke night. Come have a blast at Joe's! No admission fee. See
    www.joes.com for details. 10-23-2005, Middle of Nowhere, Arkansas.
    Missouri
    Something inane, 2-24-2006, Somewhere, Missouri
    It doesn't have to be exactly like that, but you get the idea. The kicker is that I don't have a database to store it in, and if there are a lot of entries, I'll go crazy trying to add them all into the code. Is there any way I can enter these things into a file and then get the website to read them?
    I figured out how to do it with XML, but I can only use Java on my server, and I can't install things on it - only upload pictures and files. I was also able to figure out how to do it using a Tabular Data Control, but then only Internet Explorer users can see it, which isn't acceptable to me.
    It seems like it should be a fairly simple thing to do, and I might just be looking at it the wrong way. I haven't ever really done anything hardcore in Java, and I haven't used it in years, so anything you could show me code-wise would be a big help.

    Use something like HSQLDB. This way you can have all the power of a (small) database without paying your webhoster for MySQL & Co. The only requirement ist that you can write files somewher (I assume you can do that, but even if you couldn't there would be a way to solve this).

  • Help please! (This should be easy)

    Ok, so my father set up our printer on the wireless network yesterday. His windows based computer can print fine with it. I'm trying to get my Apple to work with it now. I have a word document up, and I select to add a new printer, I search for it, find it, add it, and then print. Everything seems okay so far, but instead of printing my document, it prints 12 blank pages, and 1 page with randomly assorted letters (code?) on it. Sooooooo.... what should I do? Thanks!!

    Eh, getting help usually means someone has had a similar issue, and also makes forays into these discussion boards.
    That being said, I've never had that problem, but I'll try to help...
    So, I'm assuming the printer software is installed on your Mac? Or it's one that is already compatible with your computer. I guess you should check your printing options that pop up when you try to print. If everything seems ok there, I'd try downloading drivers from the printer company's website and reinstalling the drivers.
    Hope this helps

  • Numbers formula help please - should be easy

    I want to link 5 adjacent cells (from Sheet 1) to 5 other adjacent cells (from Sheet 2).  (Basically display same info when I update Sheet 1 onto Sheet 2).
    I know how to do it 1 cell at a time (=,ENTER).  How can I accomplish all 5 cells in one action.>?  I have many to do....
    Thx

    I'm going to make the assumption that when you say "Sheet 1" you mean "Table 1".
    =INDIRECT(ADDRESS(COLUMN(), ROW(),4,1,"Table 2"))
    Then Fill Down. You should get this result...
    Jerry

Maybe you are looking for

  • Grouping of Shopping Carts using the report  BBP_SC_TRANSFER_GROUPED

    Hi Experts, I am a new SRM consultant and have been asked to investigate an issue regarding grouping of Shopping Carts using the report  BBP_SC_TRANSFER_GROUPED. The wanted scenario: For one specific vendor we wish to pool/group request coming from v

  • Thread pool

    Hi everybody. How can I change the number of threads available in the thread pool in the JRE ? Any hint is very welcome. Best regards Susanne

  • Pls give Link.... flash player problem

    pls give me the link of the previous flash player that works.. im not a computer expert but its clear as day that something is wrong with the latest (10.1)... pls...

  • SBO 8.8 PL10  DTW Service APInvoice

    Hi, I am having trouble importing AP Invoices (service type) in to SAP Business one 8.8 PL10.  I have not imported service type AP invoices before and there does nto seem to be examples of this in the DTW templates.... Header file: RecordKey     <doc

  • Am I stuck using ViewNX2 for .nef files ?

    I have CS2, my camera is a Nikon D7100, the .nef files will not open in Cs2. I have tried the Camera Raw 3.7 update, and the DNG converter, but that still has not solved the problem, doe's any one have a solution ?, or am I stuck using ViewNX2 ?