I need some help plz  some one replay me

i wont to write a query to have result like this table from emp table
length_for length_fif length_sex
KING BLAKE MARTIN
WARD CLARK TURNER
FORD JONES MILLER
ALLEN
JAMES
SMITH
SCOTT
ADAMS
this is what i can do
but it's not work
select decode(length(ename),4,ename) for_lnth,
decode(length(ename),5,ename) fif_lnth,
decode(length(ename),6,ename) sex_lnth
from emp;
FOR_LNTH FIF_LNTH SEX_LNTH
KING
BLAKE
CLARK
JONES
MARTIN
ALLEN
TURNER
JAMES
WARD
FORD
SMITH
SCOTT
ADAMS
MILLER
there's many field Null and i don't wont to write the number of letter like 4,5,6 in the query
i wont the query find out how many letter are there in the name
and aaaaaaaaaaaaa
i'm waiting.....

Hi,
Welcome to the forum!
This site replaces multiple whitespace with a single space by default, so things that are nicely formatted when you post them look terrible after you post them.
Type these 6 characters
{code}
(small letters only, inside curly brackets) before and after formatted text, to preserve spacing.
Re-arranging your one-column output into three columns is called pivoting.
Here's one way to do it:
WITH     got_rnum
AS
     SELECT     ename
     ,     LENGTH (ename)     AS len
     ,     ROW_NUMBER () OVER ( PARTITION BY  LENGTH (ename)
                               ORDER BY          ename     -- optional
                       )  AS rnum
     FROM     scott.emp
SELECT       MAX (CASE WHEN len = 4 THEN ename END)     AS length_4
,       MAX (CASE WHEN len = 5 THEN ename END)     AS length_5
,       MAX (CASE WHEN len = 6 THEN ename END)     AS length_6
FROM       got_rnum
GROUP BY  rnum
ORDER BY  rnum;The only place where I had to know what the lengths were was when I wrote three lines for the SELECT clause (for lengths 4, 5, and 6).
If you the query to do this, then you have to use dynamic SQL, to figure out how many different lengts there are, and what they are, and to write an appropriate SELECT clause for you.
As dynamic SQL gioes, this is pretty easy. You can do it in SQL*Plus or PL/SQL.

Similar Messages

  • Hello..i have IPhone 4S i did reset to factory settings by fault and till now after a 2 hours there is nothing just a waiting icon in the middle of the screen and none of home or turn off button are response so i do need your help plz

    hello..i have IPhone 4S i did reset to factory settings by fault and till now after a 2 hours waiting (as known it takes a 1 to 2 minutes maximum) there is nothing just a blank screen and a running waiting icon in the middle of the screen and none of home or turn off button are responsed so i do need your help plz & thanks in advance..

    Try to reset it by holding the power an home buttons at the same time until you see the Apple logo, then release.  If it won't reset, you'll probably have to force it into recovery mode and restore it, as explained here: http://support.apple.com/kb/ht1808.

  • I need your help with buying one of your software programs.

    I need your help with buying one of your software programs.
    First of all I do not want to join this “Creative Cloud” for a monthly plan.
    Adobe Illustrator CS6 is what I am wanting but every time I click on the buy button is keeps sending me to a rent page to use but I don’t want this I want to buy it program for my own use. I don’t want to rent it I want to buy it like all the other Adobe software programs that I have bought from you in the past.
    Can you help with problem?
    Tim Adams
    [email protected]

    You can buy CS6 from this page
    Creative Suite 6

  • Error 1603: Need some help with this one

    When installing iTunes I first get an error box saying
    "Error 1406: Could not write value to key \Software\classes\.cdda\OpenWithList\iTunes.exe. Verify that you have sufficient access to that key, or contact your support personnel."
    The second one (after I click on Ignore on the last box) I get it this one:
    "Error: -1603 Fatal error during installation.
    Consult Windows Installer Help (Msi.chm) or MSDN for more information"
    Strange thing is that I do have full access to my computer (or atleast in all other cases I have had since I am the only one with an account on it).
    I have done my best in trying to solve it myself but I'm running out of ideas. I have downloaded latest versions from the website and tried installing Quicktime separately. I have also tried removing Quicktime using add/or remove programs though I just I didn't dare to take full removal because it said something about system files.
    Anyway I really need some help with this, anyone got any ideas?
    Greets,
    Sixten
      Windows XP Pro  

    Do you know how to count backwards? Do you know how to construct a loop? Do you know what an autodecrementor is? Do you know how to use String length? Do you know Java arrays start with index 0 and run to length-1? Do you know you use length on arrays too? Do you know what System.out.println does?
    Show us what you have, there isn't anything here that isn't easily done the same as it would be on paper.

  • New to Solaris 9 - Need some help, if some one could answer my question plz

    Hello!
    During the installation when I set that the computer is not networked, everything (SMC) seems to work absolutely fine.
    But when I set the option that the computer is networked, The SMC (Solaris management Console) doesn;t startup. it says again and again that the server couldn't be found. Although I tried to stop and again start the SMC server process, but it didn;t work.,
    Please help me out !!!!

    I had the same problem and I installed the system not networked and then configured the network.

  • Need some HELP plz!

    i need to record some audio from a website, so how can i do this?.. on PC i use sound forge in which it allows me to record anything thats playing on my computer, so now i need to do the same but on a mac.. i have a powermac g5 quad with soundtrack pro. is theres any other programs that let me do this?

    look on versiontracker.com for Soundflower or Wiretrap. Both apps allow you to record anything from any audio surce on your mac..
    jon

  • I need some help plz!

    Hello everyone!
    I am trying to make a dvd menu that has 4 buttons.  I want to hover over a button and have the rollover state underline the text of the button and also have a picture pop up in a certain location.
    The underline is easy, but the image is giving me trouble.  There would be a total of 4 images that pop up when you roll over the 4 buttons.
    Does this make sense????
    Is this possible???
    Thanks in advance....!
    -Mark

    Mark,
    Unfortunately, things are not as easy on DVD's, as they are in Flash, or HTML.
    To do what you want, with some possible limitations, you will need to create a Duplicate Menu, for each of your Buttons. Set the Button on the "original" Menu to Auto Activate, which will trigger, when the user navigates to it on a set-top player.* The Duplicate Menu will be the same, but with the image and the underline. The Buton on the Duplicate Menu will Link to the actual Asset, Timeline, etc. This can be a lot of work, but doable. Also, do plan on writing out a flowchart on paper, to keep from getting confused.
    I thought that an article on this was in the Encore FAQ, but it appears to not have made the forum changeover. I'm sure I left something out, but will search for the article with full details on how to do this.
    Good luck,
    Hunt
    * if the DVD is played on a computer, the user will not get the Auto Activate, and will need to press the Button twice to get to the movie.

  • I need some help, plz read this

    i am using Java API for SNMP called SNMP4j, and using netbeans as IDE for JAVA and my project is abt getting the MPLS VPN information from cisco routers MIB called PPVPN-MPLS-VPN-MIB, i need to get the information in all of the eight tables in this mib using SNMP API as i already said, im interested to get the entire tables, whereas i can get only the first row of each table.
    if someone knows that how can i access the whole table or how would i know that how many number of rows are there in each table then i would be able to do what is intended.
    my problem is related to SNMP objects instance identification,
    please please, reply as soon as possible, thanking in anticipation.

    Hi,
    Welcome to the forum!
    This site replaces multiple whitespace with a single space by default, so things that are nicely formatted when you post them look terrible after you post them.
    Type these 6 characters
    {code}
    (small letters only, inside curly brackets) before and after formatted text, to preserve spacing.
    Re-arranging your one-column output into three columns is called pivoting.
    Here's one way to do it:
    WITH     got_rnum
    AS
         SELECT     ename
         ,     LENGTH (ename)     AS len
         ,     ROW_NUMBER () OVER ( PARTITION BY  LENGTH (ename)
                                   ORDER BY          ename     -- optional
                           )  AS rnum
         FROM     scott.emp
    SELECT       MAX (CASE WHEN len = 4 THEN ename END)     AS length_4
    ,       MAX (CASE WHEN len = 5 THEN ename END)     AS length_5
    ,       MAX (CASE WHEN len = 6 THEN ename END)     AS length_6
    FROM       got_rnum
    GROUP BY  rnum
    ORDER BY  rnum;The only place where I had to know what the lengths were was when I wrote three lines for the SELECT clause (for lengths 4, 5, and 6).
    If you the query to do this, then you have to use dynamic SQL, to figure out how many different lengts there are, and what they are, and to write an appropriate SELECT clause for you.
    As dynamic SQL gioes, this is pretty easy. You can do it in SQL*Plus or PL/SQL.

  • New to Solaris 9 - Needs some help, if some could answer my question plz !!

    Hello!
    During the installation when I set that the computer is not networked, everything (SMC) seems to work absolutely fine.
    But when I set the option that the computer is networked, The SMC (Solaris management Console) doesn;t startup. it says again and again that the server couldn't be found. Although I tried to stop and again start the SMC server process, but it didn;t work.,
    Please help me out !!!!

    I'll give this a shot:
    Does other network traffic work? Assuming that you are new to Solaris 9, and not just UNIX in general, you may want to make sure that your network settings are correct (ip addy, netmask, default route, and so on) SMC usually starts up a network service on port 898 (IIRC), and then starts up the client (the actual GUI) and connects to itself.

  • Concentric Circles---I need some help on this one...

    I'm trying to figure out how to change the color of my concentric rings. Here is my code:
    import java.applet.*;
    import java.awt.*;
    public class SvnRings extends Applet {
    public void paint(Graphics g) {
    int RectLeft, RectTop, RectHeight, RectWidth;
    int AppletHeight = this.getSize().height;
    int AppletWidth = this.getSize().width;
    for (int i=8; i >= 0; i--) {
    if ((i % 2) == 0) g.setColor(Color.red);
    else g.setColor(Color.white);
    RectHeight = AppletHeight*i/8;
    RectWidth = AppletWidth*i/8;
    RectLeft = AppletWidth/2 - i*AppletWidth/16;
    RectTop = AppletHeight/2 - i*AppletHeight/16;
    g.fillOval(RectLeft, RectTop, RectWidth, RectHeight);
    Can anyone tell me what I am forgeting?

    Well, what colours do you want them to be?
    You could generate them randomly, based on a sequence or from an array. I'll do the latter 'cos it's easiest.
    // 9 colours (for the 9 rings)
    private Color[] colors = new Color[] {Color.RED, Color.ORANGE, Color.YELLOW, Color.GREEN, Color.BLUE, Color.CYAN, Color.PURPLE, Color.PINK, Color.WHITE};
    for(int idx = 8; idx >= 0; idx--) {
      g.setColor(colors[idx]);
    }If you want a mathematical approach then you've got to create a new color in each iteration of the loop based on the loop value.
    Hope this helps.

  • New to Solaris administration - Need some help with some issues

    Hello all,
    I am a new to Solaris administration and need some assistance with a few things. I was going to make separate posts but decided it would be easy to keep track of in one. I really do not know much about the OS but I do have a little Linux background so that might help me out. I am going to number my problems to keep them sorted, so here we go.
    The machine:
    Sunfire V880
    4x 73GB HDs
    PCI dual fiber channel host adapter
    Attached RAID array:
    Sun StorEdge T3 Array with 9x 73GB HDs
    Sun DDS4 Tape Drive in a Unipack
    OS: Solaris 5.10
    Updates: Updated everything except 2 patches (Updating is a real pain isn't it? At least it seems that way to me.)
    1. So I might as well start with the update issues! These 2 updates will not install:
    -PostgreSQL 8.2 source code, (137004-02)
    Utility used to install the update failed with exit code {0}.
    -Patch for mediaLib in solaris, (121620-03)
    Install of update failed. Utility used to install the update is not able to save files. Utility used to install the update failed with exit code 4.
    No idea why the PostgreSQL update is not working, but the medialib patch seems to not have enough hard drive space.
    2. Where are all the drives? I don't know how to find the RAID box or the other 3 internal hard drives. When I installed the OS, I think I installed it on only one hard drive and that might be part of the reason why the medialibe update above says that I don't have enough space.
    3. I probably need more space for the OS and updates, is there a way to "add" space onto the hard drive that currently is running the OS?
    3. Once I see the other hard drives I wish to combine them to make a RAID 0 and RAID 5 array, how do I go about doing that?
    4. How can I find/see the tape drive?
    5. Does my swap space really need to be 64GB? I know the book I have read suggests it, but I only made it 5GB because it didn't seem to make sense to make it 64GB.
    Thank you in advance for the help. I know these are a lot of questions to ask but please go easy on me :)
    rjbanker
    Edited by: rjbanker on Mar 7, 2008 8:21 AM

    SolarisSAinPA*
    1.
    -PostgreSQL 8.2 source code, (137004-02)
    Utility used to install the update failed with exit code {0}.
    Exit code 0 means there were no errors. When you run showrev -p 137004-02, does your system show that the patch is installed? You can check the log for a particular patch add attempt in /var/sadm/patch/+patch_num_rev+1- A bunch of stuff shows up, here is a portion (I am not entirely sure what it means, there must be a least a page of stuff like this):
    Patch: 121081-08 Obsoletes: Requires: 121453-02 Incompatibles: Packages: SUNWc cccrr, SUNWccccr, SUNWccfw, SUNWccsign, SUNWcctpx, SUNWccinv, SUNWccccfg, SUNWcc fwctrl
    Patch: 122231-01 Obsoletes: Requires: 121453-02 Incompatibles: Packages: SUNWc ctpx
    Patch: 120932-01 Obsoletes: Requires: Incompatibles: Packages: SUNWcctpx
    Patch: 123123-02 Obsoletes: Requires: Incompatibles: Packages: SUNWccinv
    Patch: 121118-12 Obsoletes: Requires: 121453-02 Incompatibles: Packages: SUNWc smauth, SUNWppror, SUNWpprou, SUNWupdatemgru, SUNWupdatemgrr, SUNWppro-plugin-su nos-base
    2.
    Where are all the drives? I don't know how to find the RAID box or the other 3 internal hard drives. When I >installed the OS, I think I installed it on only one hard drive and that might be part of the reason why the >medialibe update above says that I don't have enough space.
    When you run format command, how many drives are listed? Identify your root drive (compare with output of df command you ran earlier) Please post here.2. Output of df-hk, looks like I ran out of room. Should I just go ahead and reinstall the OS?
    Filesystem size used avail capacity Mounted on
    /dev/dsk/c1t0d0s0 5.9G 5.4G 378M 94% /
    /devices 0K 0K 0K 0% /devices
    ctfs 0K 0K 0K 0% /system/contract
    proc 0K 0K 0K 0% /proc
    mnttab 0K 0K 0K 0% /etc/mnttab
    swap 42G 1.3M 42G 1% /etc/svc/volatile
    objfs 0K 0K 0K 0% /system/object
    /platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
    5.9G 5.4G 378M 94% /platform/sun4u-us3/lib/libc_psr.so.1
    /platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
    5.9G 5.4G 378M 94% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
    fd 0K 0K 0K 0% /dev/fd
    swap 42G 1.1M 42G 1% /tmp
    swap 42G 32K 42G 1% /var/run
    /dev/dsk/c1t0d0s7 46G 47M 46G 1% /export/home
    3. So I guess the general consensus is to reinstall the OS, is that correct?
    4. There is nothing in \dev\rmt, and unfortunately I don't have a tape to test it with!
    5. I guess 5GB will be ok for what we do.
    Alan.pae*
    1. I think the above text might explain why it failed, although I don't know how to correct it.
    2. Output of format:
    # mount
    / on /dev/dsk/c1t0d0s0 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=1d80008 on Mon Mar 10 10:56:51 2008
    /devices on /devices read/write/setuid/devices/dev=4dc0000 on Mon Mar 10 10:56:19 2008
    /system/contract on ctfs read/write/setuid/devices/dev=4e00001 on Mon Mar 10 10:56:19 2008
    /proc on proc read/write/setuid/devices/dev=4e40000 on Mon Mar 10 10:56:19 2008
    /etc/mnttab on mnttab read/write/setuid/devices/dev=4e80001 on Mon Mar 10 10:56:19 2008
    /etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=4ec0001 on Mon Mar 10 10:56:19 2008
    /system/object on objfs read/write/setuid/devices/dev=4f00001 on Mon Mar 10 10:56:19 2008
    /platform/sun4u-us3/lib/libc_psr.so.1 on /platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1 read/write/setuid/devices/dev=1d80008 on Mon Mar 10 10:56:50 2008
    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1 on /platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 read/write/setuid/devices/dev=1d80008 on Mon Mar 10 10:56:50 2008
    /dev/fd on fd read/write/setuid/devices/dev=50c0001 on Mon Mar 10 10:56:51 2008
    /tmp on swap read/write/setuid/devices/xattr/dev=4ec0002 on Mon Mar 10 10:56:52 2008
    /var/run on swap read/write/setuid/devices/xattr/dev=4ec0003 on Mon Mar 10 10:56:52 2008
    /export/home on /dev/dsk/c1t0d0s7 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=1d8000f on Mon Mar 10 10:56:57 2008
    3. Judging by the above text I will be doing a reinstall huh?
    4. Actually I am not familiar with tape backups let alone solaris backup apps! Any suggestions? (Preferably free, have to cut down on costs.)
    5. No comment
    Thanks for the help, hope to hear from you again!
    rjbanker

  • I need some help formatting some text

    I'm trying to convert a theater script to EPUB. The original file I received was a pdf. I already placed all the text in my InDesign document, but among all the text, there are some phrases between parenthesis that need to be in italics.
    Is there a way that I could instruct InDesign to change all characters between parenthesis to italics? Or will I need to manually identify and change them?
    Thanks for you help!

    Wow, never heard about this. Thank you so much.
    I'll try it when I get back home from work and post back with results.
    Now for instance, say I would like to select something between other symbols beside parenthesis, which characters should I change in the string? Tho ones in the outside or the inside? For example, if I want to select something between quotes, would the string be "?<=\().*?(?=\)" or (?<=\().*?"?=\")?
    Or am I just making stuff up and it not possible?
    Again, thanks for all the help.

  • Some help plz anyone!!

    ok i live in the uk. and in a few hours i will be ordering a macbook pro. i need help on whether to choose the glossy or non glossy display. iv looked at several different post but all of them have mixed reactions which doesnt help me at all.
    im 16 years old and ill mostly be using the laptop to type up documents and some school work and maybe playing games but none of that professional photo editing, ill also be sometimes taking it on holiday but i dont know if anyone has used a glossy in a plane.
    my question is which one should i go for. will i be seeing myself when working? is it easier to scratch? is it easier for the keyboard to make mark on the screen? if i change my mind will i be able to change it easily (as i dont live anywhere near an apple store)
    Any help would be greatly appreicated. this is my first mac and i dont want it to be a desision i regret.
    Thanks.

    Hey there Danny,
    I suggest you just use the search button and go through the MANY discussions already posted. You'll find that there are some people who love it, some people who hate it and some people who don't know anything about it (Ha Ha).
    Seriously though, I ordered a new macbook pro and opted for the glossy screen too. A friend of mine in California (Shooby) has a macbook (which has the glossy screen) and loves it. He does everything from documents, to web design, to videos and it does a great job.
    Have fun with your new macbook pro!

  • I need some help with some of the basic playlists please?!

    Basically, I always enjoyed using the playlists 'recently added' and 'most played' that originally were on my ipod touch but suddenly they have gone off my ipod  but have remained on my itunes! I have tried syncing my ipod many times but nothing has happened, I've also had a look at some of the settings with no sucess of solving the issue..
    My technology information and skills base is relitively small so I'm really stuck - please can someone advice me on how to fix this? xx

    Hey Michael,
    Here's the link to the WD support site:
    http://wdc.custhelp.com/cgi-bin/wdc.cfg/php/enduser/stdadp.php?pfaqid=84
    My experience with WDs is that when they need to be "Master single" I use no jumper. That's in most Mac setups including the iMac G4s. Which drove me nutz until I figured that out. All other manufactures I've run into need a jumper across the first pair on the left as you look at it from the back. WD is the odd man out.
    Also if you Google:
    "western digital jumpers" the 2nd response you get is from OWC (macsales.com) and they're telling you to use the slave setting. Don't know about that I've always used no jumpers but I see a lot of hard drives so next time..
    Richard

  • ~~~ Need some help doing some operations with 1-D Arrays ~~~

    I'm studying for my final in cs and I'm completely lost on one of the topics in the review sheet, it asks me to know how to find the smallest/largest values in a given 1-D array
    lets just say I have an array called aRay and it's values are 1, 9, 3 ,4 and 11, in that order
    int[] aRay = new int[5];
    int[0] aRay = 1;
    int[1] aRay = 9;
    int[2] aRay = 3;
    int[3] aRay = 4;
    int[4] aRay = 11;
    I don't know if I did that right but ok, I know I need to use a for loop, and use temp values to store a value and check if the next one is smaller, and if so, grab that one and keep going?
    int temp = 1;
    for ( int i = 0; int[i] < int[temp]; i++)
    temp++;
    Am I even on the right track.. :(
    thanks for your comments and help everyone, much appreciated

    public class bladddh
         public static void main( String [] args )
              int[] aRay = new int[5];
              aRay[0] = 1;
              aRay[1] = 9;
              aRay[2] = 3;
              aRay[3] = 4;
            aRay[4] = 11;
              //for finding the smallest
              int num=0; //will be the largest value by the end.
              for(int i=0;i<aRay.length;i++)
                 if(aRay>num)
              num=aRay[i];
              if(i == 4)
                   for(int j=0; j<aRay.length; j++)
                             if(aRay[j]<num)
                                  num=aRay[j];
              System.out.println(num);
    }I got it :D you said it wouldn't work for negative numbers though? is there a better way?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Error While Uploading, hidden file somewhere conflicting?

    I was in the process of uploading some files to Acrobat.com, most worked but a couple of them failed. The progress bar in the upper right disappeared, but my files weren't showing. Figured there was just a problem with the file, so I tried to upload

  • Passing parameter between pages

    Hi all, I have a project which has two pages, and those pages act like master-detail. The master-like page is a read-only form with navigation buttons. The user navigates the records and when the user finds the record, s/he clicks the submit button,

  • Font will not bold in InDesign, but it will in powerpoint? Help.

    Hi, I am still new to Indesign.  I am creating a brochure and I need to bold the font "Edwardian Script ITC".  I have used this font in powerpoint and I can bold it there, but I am not seeing this option in Indesign.  Why?  Is there a way to get it t

  • Can not set up Ipod

    I received a Ipod shuffle for Xmas and installed the disc, yet iPod shuffle does not appear in the Source list and the option buttons in the manual are not the same as on screen. Any ideas?

  • Material list that have been chosen in a certain costing run

    In which table I can found the material list that have been chosen in a certain costing run.