Interactive Report - sort strings/numbers in the same column

Hi all,
I have an interactive report and have a column value.
It has type varchar2 in Database.
Problem: There are existing numbers and chars in this column.
Now I want to sort as numbers as chars.
Now it's like this:
10
2
23
3
no
yes
I want like this:
2
3
10
23
no
yes
How can I receive this???
All suggestions are welcome.

without regexp option:
select vc
,      case when instr('#1#2#3#4#5#6#7#8#9#0#',substr(vc,1,1)) = 0 then 1 else 0 end sort_column
from 
select '10' vc from dual union all 
select '2'     from dual union all 
select '23'    from dual union all 
select '3'     from dual union all 
select 'no'    from dual union all 
select 'yes'   from dual union all
select 'yas'   from dual
order by 2,lpad(vc,'9',0)  --First sort on numbers, then on characters

Similar Messages

  • REPORT WITH CHANGING ITEM ON THE SAME COLUMN

    Hi to all,
    i'm trying to build a report with different item in the same column.
    Is that possible in any way using other Oracle technique?
    i'm not doing anything specific here, only i would like to know if the following possibility exist or not and how can i let apex render the htmldb_item fields 'dynamically'.
    Using this CODE inside a PL/SQL function body returning sql query I obtain the following report content. Such the code of htmldb_item.fields is written, as a field value the HTML_ITEM is not rendered, so only the description of them appear in the report.
    Does somebody know some tricks to make it work?
    Thanx a lot
    1     2     LAST_CALL     htmldb_item.date_popup (4, ROWNUM, FLD_VALUE,'dd/mon/yyyy') VALUE
    21     1     AGE     htmldb_item.text(4,FLD_VALUE,10,10) VALUE
    create or replace FUNCTION FNC_GEN_GUI_ITEM(ITEM_TYPE NUMBER) RETURN VARCHAR2 AS
    STRHTMLDITEM VARCHAR2(4000);
    BEGIN
    CASE ITEM_TYPE
    WHEN 1 THEN STRHTMLDITEM:=' htmldb_item.text(4,FLD_VALUE,10,10) VALUE ';
    WHEN 2 THEN STRHTMLDITEM:=' htmldb_item.date_popup (4, ROWNUM, FLD_VALUE,''dd/mon/yyyy'') VALUE ';
    END CASE;
    RETURN STRHTMLDITEM;
    END FNC_GEN_GUI_ITEM;
    MY TABLE AS FOLLOWS:
    CREATE TABLE "NEWPROJ"."DINFIELDGUI"
    (     "ID" NUMBER NOT NULL ENABLE,
         "FLD_TYPE" NUMBER,
         "FLD_NAME" VARCHAR2(4000 BYTE),
         "FLD_VALUE" VARCHAR2(4000 BYTE),
         CONSTRAINT "DINFIELDGUI_PK" PRIMARY KEY ("ID"));
    Message was edited by:
    Marcello Nocito

    Hi to all,
    i've solved, is very simple using decode inside the select:
    SELECT
    ID,
    FK_HTMLDB_ITEM, DECODE(FK_HTMLDB_ITEM,1,HTMLDB_ITEM.DATE_POPUP(3,rownum,VAL,'dd-mon-yyyy'),2,HTMLDB_ITEM.TEXT(3,VAL)) VALORE
    FROM TESTID
    my table is:
    CREATE TABLE "DEV"."TESTID"
    (     "ID" NUMBER NOT NULL ENABLE,
         "FK_HTMLDB_ITEM" NUMBER,
         "VAL" VARCHAR2(4000 BYTE))
    Bye Bye

  • Interactive report and corresponding chart at the same time

    Hi,
    Is it possible to show interactive report and chart at the same time. I want to show chart beside the report.
    Any ideas or suggestion please?
    Thanks
    Aali

    Yes and no.
    Yes you can simply create a new chart region. This will have its own independed query.
    No. The chart that you can create with the IR-Chart feature replaces the normal table view.
    What I usually do is to save the Chart as a named report and then you have it as an extra tab in your interactiv report.

  • How do you sort numbers in the same field in excel 2010 the same for access 2010

    Hi,
    Is there a way to sort data horizontally in the same field in excel and for access, or is there an addin that can do this
    or  function code
    field data    6-4-25-23-11-45
    sort order 4-6-11-23-25-45
    Regards,
    Rudolf
    rudolfelizabeth

    sort data horizontally in the same field in excel
    Does "in the same field" means that the string "6-4-25-23-11-45" is located in one cell?
    In that case you have to use an UDF. Paste this code into a regular module:
    Function SortNumbersPrim(ByVal What As String, Optional ByVal Delimiter) As Variant
      Dim Arr, Temp
      Dim i As Long, j As Long
      Arr = Split(What, Delimiter)
      For i = LBound(Arr) + 1 To UBound(Arr)
        Temp = Val(Arr(i))
        For j = i - 1 To LBound(Arr) Step -1
          If Val(Arr(j)) <= Temp Then Exit For
          Arr(j + 1) = Arr(j)
        Next
        Arr(j + 1) = Temp
      Next
      SortNumbersPrim = Join(Arr, Delimiter)
    End Function
    Then use a formula like this:
    =SortNumbersPrim(A1,"-")
    Andreas.

  • Features that are not supported by Excel in the browser and interactive reports will be removed from the saved copy

    I Created a power view in Excel 2013 and uploaded to my Power BI for o365 site.
    But when i click on my excel file it opens in browser,After that i click on File tab its showing me two option 
    1. Save a Copy
    2.Download a copy
    When i click on save a copy its showing me an warning below
    Features that are not supported by Excel in the browser and interactive reports will be removed from the saved copy.
    Continue with Save?
    If i continue saving it only saves an excel files with data only not the power view which i want to save with applied filters.
    Please help me for this

    Just to clarify, when you hit the option of Save As Copy, the whole experience goes into a "read-write" mode in Excel services, which currently doesn't support authoring, just consumption of PowerView sheets.
    Two mitigations that come to mind:
    1. Download the copy (as Brad suggests), rename the file and upload.
    2. Use the send to option of SharePoint online, give the file the right target document library (can be the same as source) and rename the file:
    GALROY

  • Does not do the sorting if I click twice to the same column.

    Hello
    I am new to winforms.
    I have a listview. I want it to toggle the sorting of the records of the listview when the columns are clicked
    Please guide me as to how to do the same.
    The code that I have attached does not do the sorting if I click twice to the same column. I have to click a different column ten the previous column 
    The code is attached below
    regards
    Manoj Gokhale
    private void SiteInChargeorSupervisor_Load(object sender, EventArgs e)
    this.listView1.ColumnClick += new ColumnClickEventHandler(listView1_ColumnClick);
    private void listView1_ColumnClick(object sender, ColumnClickEventArgs e)
    ListViewSorter Sorter = new ListViewSorter();
    listView1.ListViewItemSorter = Sorter;
    if (!(listView1.ListViewItemSorter is ListViewSorter))
    return;
    Sorter = (ListViewSorter)listView1.ListViewItemSorter;
    if (Sorter.LastSort == e.Column)
    if (listView1.Sorting == System.Windows.Forms.SortOrder.Ascending)
    listView1.Sorting = System.Windows.Forms.SortOrder.Descending;
    else
    listView1.Sorting = System.Windows.Forms.SortOrder.Ascending;
    else
    listView1.Sorting = System.Windows.Forms.SortOrder.Descending;
    Sorter.ByColumn = e.Column;
    listView1.Sort();
    public class ListViewSorter : System.Collections.IComparer
    public int Compare(object o1, object o2)
    if (!(o1 is ListViewItem))
    return (0);
    if (!(o2 is ListViewItem))
    return (0);
    ListViewItem lvi1 = (ListViewItem)o2;
    string str1 = lvi1.SubItems[ByColumn].Text;
    ListViewItem lvi2 = (ListViewItem)o1;
    string str2 = lvi2.SubItems[ByColumn].Text;
    int result;
    if (lvi1.ListView.Sorting == System.Windows.Forms.SortOrder.Ascending)
    result = String.Compare(str1, str2);
    else
    result = String.Compare(str2, str1);
    LastSort = ByColumn;
    return (result);
    public int ByColumn
    get { return Column; }
    set { Column = value; }
    int Column = 0;
    public int LastSort
    get { return LastColumn; }
    set { LastColumn = value; }
    int LastColumn = 0;

    Every time through the ColumnClick event handler, you are creating a new sorter. This means that any values set in the sorter from the previous click are not saved.
    Try this.
    private void listView1_ColumnClick(object sender, ColumnClickEventArgs e)
    // Only create a new sorter if we don't have one already.
    if(listView1.ListViewItemSorter == null)
    ListViewSorter Sorter = new ListViewSorter();
    listView1.ListViewItemSorter = Sorter;
    // And so on with the rest of your code.

  • Null and empty string not being the same in object?

    Hello,
    I know that null and empty string are interpreted the same in oracle.
    However I discovered the strange behaviour concerning user defined objects:
    create or replace
    TYPE object AS OBJECT (
    value VARCHAR2(2000)
    declare
    xml xmltype;
    obj object;
    begin
    obj := object('abcd');
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    obj.value := '';
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    obj.value := null;
    xml := xmltype(obj);
    dbms_output.put_line(xml.getStringVal());
    end;
    When creating xml from object, all not-null fields are transformed into xml tag.
    I supposed that obj.value being either '' or null will lead to the same result.
    However this is output from Oracle 9i:
    <OBJECT_ID><VALUE>abcd</VALUE></OBJECT_ID>
    <OBJECT_ID><VALUE></VALUE></OBJECT_ID>
    <OBJECT_ID/>
    Oracle 10g behaves as expected:
    <OBJECT><VALUE>abcd</VALUE></OBJECT>
    <OBJECT/>
    <OBJECT/>
    However Oracle 9i behaviour leads me to the conclusion that oracle
    must somehow distinguish between empty string and null in user defined objects...
    Can someone clarify this behaviour?
    Thus is it possible to test if object's field is empty or null?

    However Oracle 9i behaviour leads me to the conclusion that oracle
    must somehow distinguish between empty string and null in user defined objects...
    Can someone clarify this behaviour?
    Thus is it possible to test if object's field is empty or null?A lot of "fixes" were done, relating to XML in 10g and the XML functionality of 9i was known to be buggy.
    I think you can safely assume that null and empty strings are treated the same by Oracle regardless. If you're using anything less than 10g, it's not supported any more anyway, so upgrade. Don't rely on any assumptions that may appear due to bugs.

  • How can I interact between two different frames in the same indesign template as well as from one template to another.

    I am looking for the best way (or any way) to interact between two different frames in the same indesign template as well as from one template to another. It's for a DPS app which needs to carry some button initiated data from one page to another and then present it in a table.

    There is no simple way to do it, as itunes wont let you use it on another computer without wiping the contents first.
    However if you really want to transfer songs to another computer then you could try this;
    * make sure that your ipod is accessible as a disk drive (ipod options)
    * when you plug your ipod into the computer you want to transfer to make sure you select "no" or "cancel" when it asks to wipe the contents. Leave the ipod connected and quit from itunes.
    * go to "my computer" and access the ipod directly. You probably have to select "view hidden files" from windows. You will see a lot of folders with odd names like ZX838aff with similar named files inside.
    * copy these files to a folder on your computers hardrive. Now remove the ipod and start itunes.
    * import the files from the folder you made in the last step.
    * Now your music is on itunes, but with unrecogisable names.
    This is the only way I have found to do it, but there may be another way, say with an application to do the hard work for you.
    Generic homebuild PC Windows XP
    Generic homebuild PC   Windows XP  

  • How to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part

    Hi,
    I want to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part like mentioned below:
    http://server/pages/Default.aspx?Title=Arup&Title=Ratan
    But it always return those items whose "Title" value is "Arup". It is not returned any items whose "Title" is "Ratan".
    I have followed the
    http://office.microsoft.com/en-us/sharepointserver/HA102509991033.aspx#1
    Please suggest me.
    Thanks | Arup
    THanks! Arup R(MCTS)
    SucCeSS DoEs NOT MatTer.

    Hi DH, sorry for not being clear.
    It works when I create the connection from that web part that you want to be connected with the Query String Filter Web part. So let's say you created a web part page. Then you could connect a parameterized Excel Workbook to an Excel Web Access Web Part
    (or a Performance Point Dashboard etc.) and you insert it into your page and add
    a Query String Filter Web Part . Then you can connect them by editing the Query String Filter Web Part but also by editing the Excel Web Access Web Part. And only when I created from the latter it worked
    with multiple values for one parameter. If you have any more questions let me know. See you, Ingo

  • I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    Why not use an event
    Add a While Loop, inside the loop add the Event Sructure.
    Now in the event structure selecd the String Controls.value change event to
    react
    and the new value inside the event that you get,( connect to the String
    indicator box.
    On Sun, 10 Aug 2003 15:58:47 -0500 (CDT), WiltonFilho wrote:
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

  • Figure numbering AND paragraph numbering in the same document

    Hi everyone,
    I have a document with both figure numbering and paragraph numbering. So let say I am in section 4, then the first paragraph would be "4.1. Introduction" and the first picture would be "Figure 4.1: Cool pics".
    I created two different lists, one for the figure and another one for the text so that figure numbers and paragraph number don't conflict. However I cannot add the section number in the figure numbering since it's on the other list... I tried to have the figure numbering and paragraph numbering in the same list, but then the numbers conflict (e.g it gives 4.1 Introduction and Figure 4.2: Cool pics).
    Can anyone help me, doing what I want (which is "4.1. Introduction" and "Figure 4.1: Cool pics")? Any help would be appreciated.
    Thanks!
    ps: I am using Indesign CS5.5 on a pc

    Thanks for your answer Jump_Over, but my project is already divided into chapters (themselves divided in sections) in a book.
    I found a way around by having the figure numbering in the same list as the paragraph numbering, the twist : while I use level 1 to 4 in paragraph numbering, I use level 5 for figure numbering with a numbering definition like ^1.^#, so no more conflict between numbers.
    It's working fine so far...

  • Contacts with multiple numbers under the same labe...

    i
    I have many contacts which have numbers saved under the same label.
    For example a contact like this:
    First name: A
    Mobile: 11
    Mobile: 22
    Telephone: 33
    Telephone: 44
    When I open Ovi Suite / Contacts / Contacts in E51 and open the abovementioned contact "A" it shows:
    A
    Mobile: 11
    Telephone: 44
    Mobile (other): 22
    As you see it deleted one of "Telephone" labeled numbers. It also happened when I used PC suite.
    It is really annoying as if I save/sync the contact using Ovi, it causes loss of contacts data.
    BTW there is no problem using Backup/Restore function of Ovi/PC suite, nor "Copy to memory card" function of the phone itself.
    Ovi suit version : 2.1.1.1
    Nokia E51 v300.34.56
    Windows 7
    PS:
    tested another one with 6 different numbers under the same "Mobile" label
    the result in Ovi is:
    AA
    Mobile: 11
    Mobile (main): 33
    Mobile (other): 22
    the other 3 numbers were lost

    atammin wrote:
    Ah, you have an interesting setup here.
    Could you answer a few clarifying questions regarding this.
    > When I open Ovi Suite / Contacts / Contacts in E51 and open the abovementioned contact "A" it shows
    * Did you perform a sync? Or did you just connect the phone and look at the contact card in the phone view?
    I had performed sync before and realized that some contact data are missing in my phone, so I started investigating to see exactly which contacts are affected by creating some dummy contacts and editing them by clicking on my phones icon below the window of "Contacts" tab in ovi.
    * Did you check the contact in your phone (using the phone's UI)? Were all the details there - or are you saying that Ovi Suite lost some of the details?
    In fact both. Ovi fails to extract and show some numbers and thus fails to write them back to the phone correctly. The lost details are purged from the phone too.
    Just to confirm I've understood the scenario correctly
    1) you have contact card in phone with two mobile numbers  (same label) and two telephone numbers (same label)
    yep
    2) you sync with Ovi suite
    Either Sync or directly open and save contact.
    3) the mobile numbers have been re-labled  to Mobile and Mobile (other) but the numbers are preserved
    They are re-labled only when viewed in Ovi, but  written back to the phone with the same "Mobile" lable as created on the phone.
    4) one of the Telephone numbers is completely lost from Ovi Suite and phone.
    And this scenario happened with this setup:
    - Ovi suite version : 2.1.1.1
    - Nokia E51 v300.34.56
    - Windows 7
    I just want to be clear on the setup and scenario so we can investigate.
    thanks, Aki
    I also done another test
    This is the contact created in phone:
    BEGIN:VCARD
    VERSION:2.1
    N:;A
    TEL;CELL:11
    TEL;CELL:22
    TEL;CELL:33
    TEL;CELL:44
    TEL;CELL:55
    TEL;CELL:66
    TEL;VOICE:11
    TEL;VOICE:22
    TEL;VOICE:33
    TEL;VOICE;HOME:11
    TEL;VOICE;HOME:22
    TEL;VOICE;HOME:33
    TEL;VOICE;WORK:11
    TEL;VOICE;WORK:22
    TEL;VOICE;WORK:33
    X-CLASSrivate
    END:VCARD
    And this is what happens to contact when I just click edit and then save in Ovi.
    BEGIN:VCARD
    VERSION:2.1
    N:;A
    TEL;CELL;PREF:11
    TEL;CELL:33
    TEL;VOICE:33
    TEL;VOICE;HOME:33
    TEL;VOICE;WORK:33
    END:VCARD
    I also attached what ovi shows about this contact as an image.
    Attachments:
    displayed in ovi.PNG ‏9 KB

  • How do you apply 2 different types of page numbers in the same document?

    How do one apply 2 different types of page numbers in the same document??? I do not want a number on the first page!

    Click in the second section text:
    Inspector > Layout > Section > Configuration > uncheck Use previous headers and footers
    Then go back and simply delete what's in the header/footer of the first section.
    Peter

  • I am having trouble getting a numbers spreadsheet to hold different formats in the same column.  A column with a date formatted heading will not convert to $ for the cells below.   Any suggestions would help.

    I am having trouble getting a numbers spreadsheet to hold different formats in the same column.  A column with a date formatted heading will not convert to $ for the cells below.   Any suggestions would help.

    Hi Wayne,
    Thank you for this response.  I have tried this but when I start enterring $ amounts some, such as $6.00, go in OK others such as $4.00 appear as a date ie 4 Oct 12.  
    Kind regards
    Paul

  • How to export 2 different report with a link at the same time

    Hi,
    Do anybody know how to export 2 different report with a link at the same time. I currently create a report which link to another report. But when I want to export the 1st report I also want the 2nd report also be exported.
    Thank you very much.
    Best Rgds,
    SL Voon

    Export all the three components individually.
    It will generate 3 script files. Now run them from SQL>
    null

Maybe you are looking for

  • Bonjour printing to HP AIO printer

    While trying to get a pair of HP 3180 printers working, I found that I had to install DIFFERENT drivers for the one that was directly connected and one that was connected via Bonjour. If I used the wrong driver, I would get a 9672 error. I am also tr

  • Photos do not appear in iMovie 11

    Suddenlhy photos imported into iMovie 11 do  not appear in iMovie anymore. Previously imported photos appear fine. I am using OSX Mountain Lion. Any idea what is wrong ?

  • All Adobe Products Render Crash!

    I have a problem with Adobe Media Encoder, After Effects, and Premiere Pro (All CS6) when rendering. I get around the halfway mark on any length of video (From 2 to 20 minutes I have tried) and it will crash, and present me with this error The detail

  • No matter what I try - unable to use iTunes music store

    My iTunes account info has my correct credit card info (expires in 2008) yet I keep getting an error message saying 'credit card is about to expire.' And that's not the case. I emailed Apple and got their suggestion which included things like 'select

  • Reinstalled Illustrator CS2 but can not activate

    HELP!  I replaced my computer and reinstalled Illustrator CS2 (works fine for me, I don't need an upgrade) but it won't allow me to activate over the internet and when calling the activate over the phone it simply tells me to go to the adobe.com/go/a