Help to put logic in a specific Order by clause

Suppose in the employee table 2 fields are available.
1. Name, 2. Name_flag.
Furter the structure is like,
NAME     NAME_FLAG
SMITH     4
CLARK     3
JONES     4
BLAKE     2
KING     1
SCOTT     3
NICK     2
RICKY     2
I want to diplay the names in order to name_flag's order in a specific sequence like 2,4,1,3. As shown below.
NAME     NAME_FLAG
BLAKE     2
NICK     2
RICKY     2
JONES     4
SMITH     4
KING     1
CLARK     3
SCOTT     3
Kindly help to put a logic in the query.

ORDER BY DECODE(NAME_FLAG, 2, 1,
                           4,2,
                           1,3,
                           2,4,
                           5)

Similar Messages

  • Can you manually move files within a folder to put them in a specific order?

    I am new to mac, I was wondering if there is an app maybe that you could move files within a folder (ie photos) to make them in a specific order and then rename them, I used to be able to do this with my windows xp..... cant seem to make it happen with my new macbook pro and from what i can gather it cant be done? can it? Thanx in advance.........

    Thomas, I have set the view to maunally but when i move the icons they return to where they were sitting..?
    In the Finder? You probably have a sort selected in the Sort By submenu in the View menu. However, the order of icons in icon view won't have any influence on the order of the images in the slideshow, I think. Use iPhoto, this is one of the things it's made for, the Finder is not.

  • How do I reorder songs in a playlist in the new itunes??? I can no longer just click and drag. When I click, it doesn't move!!!! Need help ASAP- trying to prepare for an aerobics class and need songs in a specific order!

    How do I reorder songs in a playlist in the new itunes??? I can no longer just click and drag. When I click, it doesn't move!!!! Need help ASAP- trying to prepare for an aerobics class and need songs in a specific order!

    Vera,
    Use View > View Options, and set 'Sort By" to "Manual Order."
    Then you will be able to drag-n-drop songs up and down the list.

  • Help with AS3, loading multiple files into a movieclip in specific order in scrollbar

    Hello! I am in need of some advice. We are trying to build a site with these features:
    Our site will be built in Actionscript 3.
    1. A navigation menu that, when a button is clicked, will scroll the site quickly to a specific Y position using swfaddress.
    2. The entire site is controlled by a flash scroll bar, which will be scrolling a single movieclip.
        2A. The movieclip will load content corresponding to the navigation categories, all which is organized into zipped files (using this to extract the contents of each section, example: about.zip for the about         section of the site)
        2B. The movieclip will load multiple zipped files one by one that correspond to the navigation, in order, making the site appear to be very tall.
    **What we are in need of is understanding how to load multiple zipped files into a movie clip, in a specific order, and having them scroll between one another through the navigation. The separate navigation categories can be in movieclips instead of zipped files if that is easier.
    Here is a reference of something that works like this: http://swfc-shanghai.com/#/about/

    Hello kglad! I have set aside the idea of using zipped files, and am now just using multiple external swfs that I'd like to load into the movieclip in a specific order. Any thoughts?
    I'm new to AS3, and I'm  attempting to create a scrolling movieclip that will load multiple  external files, in order, into that movieclip. I'm using XML as well. At  this point, nothing is loading into my movieclip (contentMain) and it's  a bit frustrating! Thank you for your help!
    Current error: 1180: Call to a possibly undefined method load.
    AS3:
    //XML Loader
    var myXML:XML = new XML();
    myXML.ignoreWhite = true;
    myXML.load ("master.xml");
    myXML.onLoad =function(sucess) {
       if (sucess) {
    contentMain.loadAll();{
         load("1_Overview.swf")
         load("2_Webcam.swf")
         load("3_Twounion.swf")
         load("4_Oneunion.swf")
         load("5_Retail.swf")
         load("6_Nearby.swf")
         load("7_Courtyard.swf")
         load("8_Map.swf")
         load("9_Conference.swf")
         load("10_News.swf")
         load("11_Sustainability.swf")
         load("12_Contact.swf")
    addEventListener("complete",onLoad)
    onLoad();{
    //load all
         }else {
             trace("ERROR LOADING XML");

  • How do I add 3 projects in specific order to make 1 dvd?

    I would like to make a DVD out of 3 projects I created in I movie. All the projects consists of photos and I added a different song for each and would like them to be in specific order. I downloaded them to I tunes but they rearranged the order of the project. Any help would be appreciated. Thanks.

    I would "Share" each project , one after the other, to Media Browser. Then you can access them directly when you open iDVD (from the media browser in iDVD) , and drag each of them into the iDVD screen and burn the DVD.
    I think that is what you want.
    roger

  • How do I insert multiple pages in a specific order?

    I create reports in Word and convert them to Adobe before sending them out to customers. I often need to insert additional (Adobe) pages into the report before sending it out; sometimes I need to insert mulitple (20 or 30) pages. Does anyone know how I can insert these pages in a specific order? A few times in the past, Adobe gave me the option to select the order, but lately that option has not come up. HELP!

    Hello Try67,
    I go to Document>Insert Pages then select the files I need to insert. The order in which the pages are inserted is important because they are results of pressure tests (e.g. Sample 1 thru sample 10). I just ran a trial; I tried to select them from top to bottom and bottom to top and it did not seem to make a difference...they went into the document in reverse order. As I mentioned earlier I used to get a pop-up screen that would ask what order I wanted the inserted pages in...I don't get that pop-up anymore.

  • How to add a specific order type into any particular report

    Hi All,
    How to add a specific document type(order type) into any particular report in order to review OTD performance.
    I need to add one specific order type to existing reports which will help to check the performance of the delivery type for that particular order type to the users.
    Thanks,
    Raj

    Hi Rajesh,
    thanks for the reply when i tried as the way you said.. but the system is asking more details like varient. so if you can clearly specify the process for order type (VOV8-- table TVAK) so it will helpful for me.
    Thanks
    Raj

  • Need some help getting my logic express 7 to work!

    alright so....i bought logic express 7 about 3 years ago and i HAVE NEVER USED IT! the reason being is because i could never get it to work and gave up 3 yrs ago. i just recently came across again while cleaning out my closet...i tried again but it still wont work...i think it says i need logic express 6 in order to get it work. is this true???? if so, where can i get logic express 6? i've searched everywhere and i can't seem to find it!
    can someone please help me out?? i don't want it to go to waste! please?
    thanx.
    -smitty

    sorry disregard...i just saw the sticker that says upgrade for express...idiot!

  • How do i get to put my songs in alphabetical order on my iPod ?

    I put my songs in alphabetical order on itunes, i sync the iPod but when i look on my iPod the songs are not in alphabetical order .. anyone can help ??

    I'm pretty sure everything from the 'Songs' list on the iPod is automatically alphabetical. It's the same on all iPods as well. Maybe you have some other characters in front of the song name or perhaps you're looking at a song list through another list such as 'Artist' or 'Genre'?

  • In Itunes, my cd's are no longer burning in the specific order I list songs on a newly created playlist. Is there a quik fix for this issue?

    In Itunes, my cd's are no longer burning in the specific order I list songs on a newly created playlist. Is there a quik fix for this issue?

    Hi RaeTye,
    If this issue is happening with an MP3 CD (as opposed to an Audio CD), you may find the following article helpful:
    iTunes: How to set the play order of songs on an MP3 CD
    http://support.apple.com/kb/ht2455
    Regards,
    - Brenden

  • HT1535 I want to load a playlist onto an iPod Shuffle that plays in a specific order. (The ipod is not on the shuffle mode but it keeps changing the desried order. I'm going crazy!

    I've created a playlist in iTunes for someone in a specific order. I've bought them an iPod shuffle and have downloaded the playlist onto the iPod. Unfortunately, the iPod shuffle then reorders the paylist and it also plays in another order. The shuffle function is switched off, so I don't elieve it is anything to do with that!
    It's driving me crazy! Please help!!!

    Which shuffle model do you have?  This document shows the four types
    http://support.apple.com/kb/HT1719
    Assuming it is the current 4th gen shuffle (or 3rd gen), if you want to play songs from a playlist on the shuffle, in playlist order, you need to use VoiceOver to switch to that playlist.  By default, the shuffle plays songs from the All Songs list.  When you set the power switch to play-in-order, the All Songs list plays songs alphabetically.
    This document explains how to set up and use VoiceOver on the shuffle.
    http://support.apple.com/kb/ht4322
    If that playlist is selected, and the power switch is set to play-in-order, the shuffle plays the songs in playlist order.

  • Wants To Put Songs In a Particular Order

    I've subscribed to spotify in order to build my playlists for my upcoming wedding.
    Though it doesn't matter what order the songs are in for cocktail hour, I have a DJ mentality and want to put songs into a good organized flow for the reception. Is there a way to do this?
    Thanks for any and all help
    -Melanie

    Hello:
    Yes you should be able to do this. Just create your playlists, and add the tracks you want and put them in the play order you want. You can do this by dragging each track up or down the playlist order listing you wish for the track to be played in the order you want, after those tracks have been added to the playlists of course. Just make sure you do not click on any of the columns in the playlists as that reorders the track listing accordingly to whichever column you click on. You probable will want to double check these playlists a day or so before the wedding, as the content gets updated daily, so any content not available before the wedding will be unplayable unless you download it previously before the wedding. If you have a permium account, what you can do once you have the playlists set up how you want, with the music you want, and the order I would download those playlists for offline use, as you can keep the music for up to 30 days without a device app resync to update the music licenses. Just make sure before you download the playlists for offline use, you select in the app Preferences for High Quality streaming so they are downloaded in the higher quality when you set the playlists for offline use.
    You can set up a test playlist and do the offline listening option in the high quality streaming to see how it will work when you use the device in offline mode without an Internet connection. A broken stream due to Internet issues could put a damper on things with songs having problems streaming over the internet. When you are ready to get the proper playlists downloaded for offline mode for the wedding, just put the test playlist back to online mode, and set the wedding playlists to offline so they can start the downloading procedure. The switching playlists back to online and offline ensures you stay within the 3,333 track download limit, but you should be fine for a wedding though unless it is going to go on for a week. :-)

  • Column dissappeared in Cross tab with specific order

    Hi experts,
    I have a cross tab, with 2 columns from YEAR (2009, and 2010). Then I created a other column with the differences of both columns before, I changed the SPECIFIC ORDER and the 3th column is DISAPPEARED!!!
    I dont understand why!!
    thank you very much

    At the beggining i have the following columns:
    2009 2010 Desviation
    I created this with specifciar order.
    Then, I want to change the order and I put :
    2008 2009
    but the desviation is disappearing.
    thank u

  • I want to play my songs in a specific order

    I just bought a Nano, and put on it a playlist of songs to play in a specific order. But when I play the playlist, the songs are shuffled. Is there a way to play them in the order I want them in?

    Check Settings > Shuffle and make sure it is off.

  • Report which has four selection screens called in a specific order

    Hi All,
    In a report, how can I call multiple selection screens predefined, and  create BDC recording in the program based on the values entered in the selection screens. The selection screens are 4 in my scenario in a specific order. Please send across sample code which has the logic to call multiple selection screens and create BDC recording for sales order, delivery, PGI..Thanks
    Ricky

    If ur option is to creat multiple screens...go for tabstrip option in ur report and record it.
    selection-screen begin of screen 001 as subscreen.
    selection-screen begin of block b1 with frame title text-001.
    selection-screen begin of line.
    selection-screen comment 2(10) text-003.
    parameters:par1 type marc-matnr.
    selection-screen end of line.
    selection-screen end of block b1.
    selection-screen end of screen 001.
    selection-screen begin of screen 002 as subscreen.
    selection-screen begin of block b2 with frame title text-002.
    selection-screen begin of line.
    selection-screen comment 2(10) text-003.
    parameters:par2 type marc-matnr.
    selection-screen end of line.
    selection-screen end of block b2.
    selection-screen end of screen 002.
    selection-screen begin of tabbed block tabstrip for 10 lines.
    selection-screen tab (15) tabs1 user-command t1 default screen 001.
    selection-screen tab (15) tabs2 user-command t2 default screen 002.
    selection-screen end of block tabstrip.
    initialization.
    tabs1 = 'TAB1'.
    tabs2 = 'TAB2'.

Maybe you are looking for

  • Multiple Dev and Qas systems in STMS

    Hi all, I have a scenarios with two Dev clients (ABAP, and Config), and multiple Qas clients with a single Target.  I would like to configure the System Landscape (Logical Components), and Project with the relevant client paths. We have two Paths: 1.

  • Upgraded to Lion and now can not see my external raid drive

    I had a raid array set up in snow lepord using the OS X raid controler on my iMac. After upgrading to Lion, the drive is not reconized and there is no raid control panel (that I can find) in Lion. Anyone have a solution that will prevent me from losi

  • Is moving all active ports to another VSAN disruptive?..

    Hi! I moved all active ports to another VSAN and this caused a server to failure. I know that this can be because of the small time-out values at the operating system or bad multipathing, but how large a time-out can be in a such reconfiguration?.. W

  • Standby database in oracle10gr2

    Hi i am using oracle10g r2 database on Suse10 just i[b] want create standby database in other suse10 machine.... please ,help me................

  • Can anyone tell me how this effect was created?

    At about 12 seconds into this clip there is the camera center frame brackets which take a snapshot and adds the clip to a timeline below the video.  Its all animated and very cool. http://gopro.com/videos/video-of-the-day/2013/7/30/