How to achieve the order of base on my entry?

Hi all

I have the following query
select column_name,column_id from user_tab_columns
             where table_name = 'ITEM_GROUPS'
               And column_id in (Select to_number(column_value) from The(Select cast(str2tbl('25,26,31,32,24') as mytabletype) from dual))
I passing the entrance to the str2tble function as interpreted above ('25,26,31,32,24'). But when I run the query above,
I got the following result.
1     TYPE       24
2     MOC1     25
3     MOC2     26
4     SIZE1     31
5     SIZE2     32
But I need the output based on the order of entry. as
1     MOC1     25
2     MOC2     26
3     SIZE1     31
4     SIZE2     32
5     TYPE             24
Please help me how to do this.

Iqbal

Off topic, but why don't you do just this:

select column_name,column_id
from user_tab_columns
where table_name = 'ITEM_GROUPS'
  and column_id in (25,26,31,32,24)

If you want a guaranteed order, then you will need to specify and ORDER BY.
For example this one (although I don't expect that that's what you're looking for).

order by
  case column_id
   when 25 then 1
   when 26 then 2
   when 31 then 3
   when 32 then 4
   when 24 then 5
  end

You can try this (untested):

select c.column_name,c.column_id
from user_tab_columns c
     ,(select to_number(column_value) as col_id
             ,rownum as rn
       from The(Select cast(str2tbl('25,26,31,32,24') as mytabletype) from dual) x
where c.table_name = 'ITEM_GROUPS'
  and c.column_id = x.col_id
order by x.rn

Published by: Toon Koppelaars April 27, 2011 12:53

Tags: Database

Similar Questions

  • How to keep the order of photos in an album for a pound of apples

    How to maintain the order of photos in an album when moving pictures to create a notebook from Apple?    They are placed in the book of the order of date, but a lot of my photos are scanned and have nothing to do with the date of the photo.  I use version 1.3 of Photo with iOS 10.11.3. I have read the previous assignments and fail to follow the suggestions that they seem to have apply to older versions of picture (iPhoto).   Thank you

    Adjust the dates of your photos with "Image > setting Date and Time", as well as the date of the photos match the order desired.

    It was possible to select all the photos in an album in iPhoto 1.0 and then use ' file > Create book "and the pictures would be displayed in the book on the order that have been put in the book, but that does not work reliably.

    You can also start with a blank book and drag the photos of book one - by - one in the order of your choice.

    In other words, what I'm doing anyway.  I start with a blank book and add the photo I'm going from several albums. I create an album separate for each section and drag only the photos for the next pages of the book, so I can put it on the pages I want.

  • How to reverse the order of my playlist @iTunes?

    Thus, with the new look of iTunes I can't figure out how to reverse the order of my playlist.

    I want to sort by 'love' or 'play' and have the most times (or the songs of love-labeled) on top (so number 1) and the less at the bottom of my reading list.

    For some reason any the only order plays mostly / marked love is at the bottom of the playlist and the parts less / unmarked is upstairs. Can't reverse this order. Reading order is normal (so after 1 is 2, etc.)

    How can I accomplish this?

    All my software is up-to-date.

    Thank you!

    To reverse the sort order of the list of songs, click on the header of the column used to sort again.

  • Does anyone know how to change the order of iTunes playlists in folders? I am on iTunes 12.3.2.35 thank you.

    I can't figure out how to change the order of playlists within folders or find iTunes help topics that address this issue.  Please help, someone!  Thank you.

    Karin.

    In a playlist folder iTunes sorts the smart playlists in alphabetical, followed by regular playlists in alpha order.  It does not provide a way to change this.

  • How to customize the order of music files in the folder (no not with artist, album, #, genre or classification tabs)

    I'm trying to transfer a playlist from Itunes on a folder, but I can't understand how to keep the order of the songs as I had them in the Itunes playlist.  I can't get files .mp3 alphabetically for the artist, album or genre.  Or according to numerical order by track number # or rating.  Any help in this regard would be highly appreciated.

    Here's how to change the default template for a folder: http://www.vistax64.com/tutorials/70819-windows-explorer-folder-view-settings.html.  Default behavior is to select the model based on the first type of file placed in the folder (you must choose something).  Vista sets the folder type template according to what are the types of files in the window and the settings display window Explorer. This will show how to reset the display settings for the Windows File Explorer, disable Automatic folder Type Discovery (which is I think what you want)and increase the folder display the cache to make Vista do not forget the display settings, the folder type template, the size or the position of a specific window for when it was still closed to the location of specific path.

    It does not work with the Sub record under, Open with, open in a new tab (Internet Explorer), etc... dialog windows of type through the good File menu bar item. These don't seem to be able to have their size or their position to recall. For the latter, you can use the free program http://autosizer.en.softonic.com/ to resize them.

    Here is another article on how to modify the columns in Windows Explorer and sort in Vista: http://www.vistax64.com/tutorials/108665-column-customize.html.  This will show you how Add, Remove, move, change the widthand change the sort order of the columns in Windows Explorer in the way that you want.

    Here is another article on how to change the display of the default folders in Vista (but she argues, it is not a perfect solution and can revert to the previous behavior is not as good as the two prior links provided: http://news.cnet.com/8301-13880_3-10019957-68.html.)

    I hope this helps with your situation - it may take more than one item to come up with the solution - but I would start with paragraph 3.

    Good luck!

    Lorien - MCSA/MCSE/network + / A +.

  • How to rearrange the order of slides in a carousel

    How to rearrange the order of slides in a carousel in dreamweaver? Thank you.

    Carousel bootstrap images are wrapped in a div with the class element. The fastest way to rearrange the order of the slides is to expand the carousel-inner div in the Panel of DOM. Select the div element that contains the slide that you want to move, and then drag it to the desired location as shown in the following screenshot. The green line indicates where will be placed the div.

    If you are having trouble with drag - drop with precision in the DOM Panel, select the div element that you want to move, click the right button and select cut from the context menu. Then select the div element that contains the slide that you want to the slide that you cut next, right click and select Insert before or insert after in the context menu.

  • How to change the order of the pages in pdf

    How to change the order of the pages of the pdf files scanned

    Using page thumbnails, you can shift the page you prefer. There are two documents icon.

  • How to sort the order of the pages in the pdf file

    How to rearrange the order of the pages in the pdf file

    Hi rainbowbowral,

    To reorder pages, you need the full version of Acrobat. If you wish, you can download a free 30 day trial of www.adobe.com/products/acrobat.html.

    Best,

    Sara

  • How to reset the value of a list of entry of null values

    Hello

    Jdev 12.1.3.0

    How to reset the value of a list of entry of null values

    Thank you

    AR

    Place this code in your ViewRowImpl (base) class and use it when you need to reset _all attributes applied by LOV

    @Cvele: in fact, this will happen "by design" when you set the attribute which has attached lov to null, so there is no need of additional code.

    See also this blog: binary: prevent the execution of query unwanted in British Colombia ADF when used in Non - UI applications

    My previous answer is more related to this approach:

    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator = bindings.findIteratorBinding("IteratorName");
    Row r = iterator.getCurrentRow();
    r.setAttribute("SomeAttrib", null);
    

    Dario

  • How to change the order of the keyboard languages

    Yesterday I updated the OS X 10.11.4. Today, I noticed that the order of the keyboard languages has changed, it is not any longer in alphabetical order. In my case, it used to be Canadian English, then Romanian, then Romanian - Standard. Now it is Romanian, then Romanian - Standard, so that English-speaking Canadians. I would go back to the previous command (which was true for OS X Leopard) because he is Canadian English that I use the most and I want him to be at the top. However, I can't be able to change the order. How this could be achieved? Thank you.

    Help! Anyone, please?

  • How to change the order of photos in pictures

    Hello.  I am using Photos and my photos currently appear in the order that they were imported to the Photos.  I would like my photos to be displayed in order of the date they have been taken.  Any idea on how to achieve this?  Thank you!

    The Photo Album is intended to display the photos. In order, they were imported. Use a different view to sort by capture date _ the moments or collections or an entire album.

    Or you can set your own album of Photos of all my creating a smart album with a rule that is satisfied by all the photos, for example.  Date is later to...

  • How to organize the order of the icons on the touch screen of the printer? (Office Jet Pro 8600)

    I use the touch screen only to scan documents. It's annoying to scroll through a series of unused icons to achieve the scan icon whenever I turn. How to reorder the icons so that the "Scan" icon is on the main home screen (on an iPhone that would be just pressed until it's mobile, but it does not work here).

    You can customize the selection and order of the icons in the Apps folder, but I can't figure out how to move the other icons. Come on HP, your intuitive user interface needs some attention

    Thank you!

    There is no option to rearrange the icons of an Officejet Pro 8600. Icons available is determined by the firmware of the printer and is immutable.

  • How to change the order of people

    Under El Capitan, I recently spent some time to reorganize manually about 260 faces in a seemingly random way in order of last name. Now under the Sierra Apple has decided to display them in the order first name without the possibility of manual reorganization which is useless and irritating. Any suggestions on how can I change the order?

    In Favorites, you can drag and drop them in the required location - those remaining you can not change the order

    LN

  • Why my entire collecton of photos in 'Photos' suddenly get blurred, and how to restore the order that they were in?

    It's the kind of thing that makes me want to destroy all the computers and go back to the 20th century. My computer is brand new. My virus protection, etc. works normally. I am a novice and do not want to do anything with my computer at all. But I have a collection of several thousand photos and I spend all my free time in order to get them. The order is in no way 'logic', there is no way to keep this collection except move carefully every image in one place. So yesterday, as I move an image to somewhere else in the sequence, the screen went white for a second, and then all of the thousands of photos were in what looks to be like a random order. And now, whenever I turn on the computer, the photos appear in the same order and then scrambled a progress bar green that I've not seen before travel the length of the upper part of the screen and then the images become a garbled second order, which has also no connection with that I have established with months of work. What happens here? And how can I back order and avoid that it never happen again, assuming I ever force put in several additional months of work on this?

    Hello

    I suggest you to do system restore to restore the computer to an earlier point in time.

    Click on these links for and follow these steps:

    1. http://windows.microsoft.com/en-US/windows7/Restore-system-files-and-settings   
    2. http://windows.microsoft.com/en-US/windows7/System-Restore-frequently-asked-questions

    You can make it is easier to find your pictures by applying tags to the photos. Later, you can use the search box to filter photos by tags or other
    criteria. For more information on the search for images on your computer, see this link:
    http://Windows.Microsoft.com/en-us/Windows7/managing-your-pictures

    Additional information:

    Mark photos so that they are easier to find:
    http://Windows.Microsoft.com/en-us/Windows7/tag-pictures-so-theyre-easier-to-find

    Kind regards
    Amal-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to check the order status online.

    I ordered an all-in-one VAIO by chat and phone.  I knew that Sony was temporarily out of stock.  Then, I received an email that I thought would allow me to track the order.  All I have is the number of order at the moment.  When I try to follow the command, it says use order number and postal code.  When I do that, it takes me to a page that says to use my temporary password and replace it with a perm.  I was never given a temporary password.  How to make a so that I can track my order.

    Hi Judith,

    Thanks for the post.

    Have you checked the status of the order here?

    http://store.Sony.com/webapp/WCS/stores/servlet/SYOrderStatusLandingView?StoreID=10151&langid=-1&cat...

    Contact Sony store:

    http://eSupport.Sony.com/us/Perl/support-info.pl?info_id=927

    Support order:

    1-877-865-SONY (7669)

    Mon - Fri 08:00-12:00 AM (midnight) AND

    Sat - Sun 10:00-9: 00 am EST

    Technical support:

    1-239-768-7547

    Mon - Fri 08:00-12:00 AM (midnight) AND

    Sat - Sun 10:00-9: 00 am EST

    Please indicate the solution as accepted, if you find this information useful.

    Kind regards

    Tony.

Maybe you are looking for