How to...Order by

Hi all,
create table tt_1 (col varchar2(10));
insert into TT_1 values('AAA');
insert into tt_1 values('BBB');
insert into tt_1 values('CCC');
insert into TT_1 values('DDD');
insert into tt_1 values('TEST');
insert into tt_1 values('UUUU');
insert into tt_1 values('ZZZ');
insert into TT_1 values('LLL');
insert into TT_1 values('PPP');
select * from tt_1 ;
AAA
BBB
CCC
DDD
TEST
UUUU
ZZZ
LLL
PPPDoes anybody knows how can value 'TEST' be the last of the result from query? Any specific order by clause which i don't know? Maybe any aggregation functions?
Pls help
Version: 11g
Thanks in advance,
Bahchevanov.

Do it in a subquery :
select col from (
select col from tt_1 where col in ('AAA', 'CCC', 'ZZZ')
union -- or UNION ALL ?
select col from tt_1 where col in ('TEST', 'PPP', 'UUU')
order by nullif(col,'TEST') nulls last;Edited by: odie_63 on 2 oct. 2012 14:07

Similar Messages

  • Hi , I have just created an iphotobook and when i moved on to order it , it could be only shipped to Australia and U.S.As, I live in Greece do you have any idea of how to order it and deliver it in Athens, Greece ?

    Hi , I have just created an iphoto book but when I was about to order it , i realised that iphoto books can only be shipped to Australia and USA . Does anyone have any idea how to order and deliver the book in Athens , Greece ?????

    No 
    Here is a list of the countries supported for print products  --  http://store.apple.com/us/help/print_products/routing
    in teh past I have seen some people report that they were able to pick a nearby country and use their shipping address - I have not done this and have no idea what the results were
    LN

  • How to order the photos in a slideshow

    how to order the photos in a slideshow

    Just like for any other photo - select the photos in the album and use the command "File > Order Prints".
    Be careful, not to include any text slides. If it is difficult to select the photos in the slideshow, create a new album from the photos in the film strip (File > New Album).

  • How to order / group a report by a placeholder column ?

    How to order / group a report by a placeholder column populated by the group filter ?
    In more detail .....
    My Data model editor's select statement brings back (say 1000 rows) from the database.
    The group filter decides (on performing certain validations) whether to print a row or not in the report.
    Additionally the group filter calculates a "rule type" (just a rule number to say on basis of what rule, the row was selected)
    I would like to order/group the report on the placeholder column which was calculated by the group filter ?
    Obviously, I won't be able to add the "ORDER BY :CP_RULE_NUMBER" in the sql statement as the placeholer column cp_rule_number
    is determined by the group filter level only. (If I do, I get a frequency error)
    Any ideas ?
    Thanks in advance.
    Edited by: user553361 on 8/10/2008 17:35

    how is the group filter implemented?
    If its pure PL/SQL, what about putting the filter-procedure in a stored function into the database? Then you could use the group filter in your query.

  • How Production Order finish date and time is being comptued by SAP?

    Hello Expert,
    How Production Order finish date and time is being comptued by SAP? for example, we create a Production Order via CO01, the basic start date is 29.09.2008 and time is 04:00 it gives us basic finish date is 29.09.2008 and time is 13:28.
    how does SAP compute the time 13:28 as it finished time
    Please explain me briefly.
    Thanks
    Ryan

    Hello Guys,
    When we create Production Order in R/3 the time is calculated by routing but it is extended at SetUp machine time. It is not correct?. SetUp imachines time used only for first Production Order for the same product and it is plan manually, for others Production Order we need calculate time for production without SetUp machine time being pick up to compute finish time. how could we achieve this? only those Machine time will be check.
    thanks

  • Very urgent :how I order by my report within the report option not change i

    Hi master
    Sir I design the report but I need my report order by cheq_no now my report order by voucher no but If I change in query then my format must be change that very problem for me I again design
    Is any option in report through which I order by my report as per my require column I is if I need on cheq_no , voucher_no or date
    Please give me idea how I order by my report within the report option not change in report query
    Thanking you
    aamir

    Use a lexical parameter (see online help):
    select ...
    order by &sort_parameter

  • [svn:fx-trunk] 11118: Did some code cleanup on the Spark components to enforce the conventions about how to order stuff within an AS file .

    Revision: 11118
    Author:   [email protected]
    Date:     2009-10-23 16:35:38 -0700 (Fri, 23 Oct 2009)
    Log Message:
    Did some code cleanup on the Spark components to enforce the conventions about how to order stuff within an AS file.
    QE notes: None
    Doc notes: None
    Bugs: None
    Reviewer: None; no functional changes
    Tests run: ant checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.a s
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTex tBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as

    Hi Rod,
    different sources (i.e. different branches) are mapped to different local folders in your workspace - in fact you cant map two different server folder to the same local folder.
    In you example the mapping would be (for example) like this:
    Server path                                                          
    local path
    $/../WpfHelloWorld                                                
    C:\Src\WpfHelloWorld
    $/../WpfHelloWorldDev                                           
    C:\Src\WpfHelloWorldDev             
    You can see your Workspace mappings when you select "Workspaces..." in the Workspace selection drop down:
    Within the "Manage Workspaces" dialog select your workspace and klick "Edit" to see and edit all you mappings.

  • Creative Zen - how to order playlis

    I just got the new creative zen but I can't figure out how to order the playlists. When I create a new one, it orders it alphabetically. In media explorer, if I drag/drop it to a new place, it doesn't fall into the new position, it adds all the songs from that playlist to the one I just dropped it on. It never "fits" in between the other playlists.

    "Because wma files take less space than mp3 files. "
    That is a myth. For lower bitratrate files, such as 6 kbps or 32 kbps, WMA files will sound a bit better than mp3 files at the same bitrate. Files at such low bitrates are typically lectures and podcasts, and not music. Music files are usually 28 kbps and up. At
    those bitrates, there is little quality difference between WMA and MP3 files at the same bitrate. WMA files do take more processor power to decode though, so expect shorter battery life when playing WMA files rather than mp3 files. Furthermore, recompressing files that are already compressed will result in lower sound quality. For example, if you have some mp3 files at 256 kbps and want them on your player at 60 kbps to save space, you should make the 60 kbps mp3 files from the CD, and not from the 256 kbps mp3 files if you want the 60 kbps mp3 files to be the best quality they can be.

  • Hi how to order iPhone 5 with delivery to Russia

    hi how to order iPhone 5 with delivery to Russia???

    The apple online stores don't ship outside of their own countries, so you will either need to use one of the premium resellers that is within Russia or find another online store that will ship overseas.

  • How production order create in MTS scenario

    hi
    Actually production order created based on Sales order,through MRP run(md02,04) , it will check the stock(avilability control), if it has less stock than sales it create the production order.
    Based on demand planning , we want to start the production ,so how production order created, we need to create directly CO01, OR  any process is there
    plz reply
    regards,
    sowmya

    Actually production order created based on Sales order,through MRP run(md02,04) , it will check the stock(avilability control), if it has less stock than sales it create the production order.
                I feel this is existing process of your client
    Based on demand planning , we want to start the production ,so how production order created, we need to create directly CO01, OR  any process is there
    1) If you want to consider both MTS and sale order in production then maintain strategy group 40 in MRP 3 view
    2) Create a PIR ( plan) in MD61
    3) Run a MRP in MD02/MD01
    4) As a result of MRP, you will get a plan order
    5) convert the plan order into production order in MD04

  • HT1338 Power Mac G5 have a Mac OS X 10.5.8 how I order Mavericks?

    Power Mac G5 have a Mac OS X 10.5.8 how I order Mavericks?

    A PowerMac G5 can't run 10.6 either.
    Allan

  • How to pull sales orders based on a Campaign??( I have created one Campaign and i need to know,for how many orders it was applicable)

    How to pull sales orders based on a Campaign ID??( I have created one Campaign and i need to know,for how many orders it was applicable)

    Hello,
    as far I understand you are talking about campaign determination. Once a sales order is generated having a campaign determined the campaign creates a reference to the sales order. The best way to track the assigned sales orders is using the related transactions function:
    The same feature is available for trade promotions as well.
    The data is available in table CRMD_BRELVONAE - you can also write a report selecting on OBJGUID_A_SEL with the campaign or TP guid and OBJTYPE_A_SEL with BUS2010020 for campaigns and BUS2010030 for trade promotions.
    Is this answering your questions?
    best regards,
    Johannes

  • How to order recovery disks

    i have hp g62-352ca laptop and i didnot have recovery disks so how to order to get recovery disks

    Prash.
    https://h10025.www1.hp.com/ewfrf/wc/mediaOrder?softwareitem=630247-121&cc=us&dlc=en&lc=en&os=4063&pr...
    REO
    HP Expert Tester "Now testing HP Pavilion 15t i3-4030U Win8.1, 6GB RAM and 750GB HDD"
    Loaner Program”HP Split 13 x2 13r010dx i3-4012Y Win8.1, 4GB RAM and 500GB Hybrid HDD”
    Microsoft Registered Refurbisher
    Registered Microsoft Partner
    Apple Certified Macintosh Technician Certification in progress.

  • How to order iphone 4 without contract on applestore website?

    How to order iphone 4 without contract on applestore website?
    When I choose iphone 4 16G Black, and applestore website ask me if I am AT&T wireless customer..I am not.
    How can I continue?

    QB_Gunslinger12 wrote:
    You'll have to order directly through ATT
    I assume he wants one not locked to AT&T, not only no contract. Any iPhone AT&T sells will be locked to AT&T.
    BUT .. you can buy unlocked iPhone 4 from Apple Canada:
    "Your new iPhone. Direct from Apple and ready to use.
    When you purchase your iPhone from the Apple Online Store, you’ll get it commitment-free. So you can sign up for service with the carrier of your choice and change your carrier at any time. Questions? Call our iPhone experts at 1-800-MY-APPLE."
    but I think this is only on line and likely must be shipped to a Canadian address.
    Phil

  • How To Order New AC Power Supply for Satellite A350-20Q?

    Hi,
    I bought my Satelite A350-20Q 2 1/2 yeras ago, and when I turned on my laptop the screen was dim, the power supply was already plugged in but it did not make any change. How can order a replacement?
    Thanks

    According notebook specification AC power supply for your notebook has part number PA3290E-3AC3. I dont know where do you live but Googling around and using this part number as search term you will, I hope, find enough online stores where you can order new AC adapter.
    You can also contact nearest Toshiba service provider and ask them to order it for you.

  • How to order pages to follow page number?

    Hi!
    I haven't found any thing in documentation how to order pages automatically or manually. I would like to arrange my page numbers but couldn't. Please see in attached file.
    Could you guys please me resolve this problem?

    Make yourself familiar with the concepts of "Sections" and "Imposition".
    Ask the user about their intention.
    Tell them imposition should not be done via the pages panel.
    Dirk

Maybe you are looking for