Need to be based on the values in a particular order

Hi, I have a list of data as (stored in random mode in the database)...

AA +.
AAA
AAA +.
AAA-
AA
A
A +.
A-
AA +.
BAN

Need to get the result as follows

AAA +.
AAA
AAA-
AA +.
AA
BAN
A +.
A
A-

Is there a sql query that I can try for this arrangement? Not sure if we can use regular expressions

Can anyone help

Maybe

order by lpad(translate(col,'A+-','A'),3,' ') desc,
         case substr(col,-1,1) when '+' then 1
                               when '-' then 3
                               else 2
         end

Concerning

Etbin

Tags: Database

Similar Questions

  • Need to display negative amounts, amounts positive based on the value of the parameter.

    Hi all

    I have a requirement in rdf as follows:

    I have two or three lines of the SELECT statement. An amount column having both negative and and postivie values.

    Based on the value of the parameter I need to take these records.

    Say, if the value of the parameter = "Credit amount", then I have to choose the records, the amount column value is negative.

    If the value of the parameter = "Debit amounts" then I have to choose the records, which the column value is positive.

    If the parameter Value = "All", then I must take all records, including both positive and negative.

    Please suggest how to achieve this scenario.

    Thank you
    Abdul

    In your where clause to add the following
    and ((& paramètre = "Débit" et montant > 0) or)
    (& parameter = 'Crédit' and the amount<0)>
    (& parameter = 'All'))

    Hope that answers your question
    Sandeep Gandhi
    Independent consultant
    513-325-9026.

  • Need to customize the update of merger based on the value of the indicator.

    I want to write a custom update statement based on the value of the indicator. Is it possible that I can achieve this by using CASES? Please let me know.

    Pseudo-code ARY.


    WHEN MATCHED THEN

    CASE WHEN FLAG = "Y" THEN
    GAME UPDATE
    cout_column = cout_column + mrgqueryCounts,
    date_column = sysdate;
    ON THE OTHER
    GAME UPDATE
    cout_column = mrgqueryCounts,
    date_column = sysdate;
    END


    Thanks and greetings
    Nana

    Published by: Nana Akkivalli may 2, 2011 23:07

    Published by: Nana Akkivalli may 2, 2011 23:46

    Nagaraja Akkivalli wrote:
    Thanks for your reply, Grosbois.

    I do not want to write a case statement for each column, as there is a lot of update statements. Instead, I want to write a case statement once. Is it possible that we can do? Please let me know.

    WHEN MATCHED THEN

    CASE WHEN FLAG = "Y" THEN
    GAME UPDATE
    cout_column1 = cout_column1 + mrgqueryCounts1,
    cout_column2 = cout_column2 + mrgqueryCounts2,
    cout_column3 = cout_column3 + mrgqueryCounts3,
    date_column = sysdate;
    ON THE OTHER
    GAME UPDATE
    cout_column1 = mrgqueryCounts1,
    cout_column2 = mrgqueryCounts2,
    cout_column3 = mrgqueryCounts3,
    date_column = sysdate;
    END
    Thanks and greetings
    Nana Akkivalli.

    Nana, I know, you can't do it, as you requested. I also checked some documents Oracle and could not see such use for the CASE statement.

    concerning

    Grosbois

  • Name of the dynamic property of object in the table based on the value of a variable

    I have two paintings of custom class objects

    var obj1:Object1
    var obj2:Object2
    
    var array1:Array = [obj1[0], obj1[1], ...]
    var array2:Array = [obj2[0], obj2[1], ...]
    

    Object1 has a property named. Name while Object2 has a property named. Title.

    Now I have a common function including cab accepts an array (array1 or array2) and the name of property the object ("Name" or "Title") as input and needs to access this name of the property of the objects in the array:

    function myFunction(arr:Array, fieldName:String)
    {
        arr[0].fieldName  = "xxx";
    }
    

    the problem I have this achievement does not because the code in the function assumes that the property of that object in the table is actually a string "fieldName" while I want to dynamically determine the names of the fields based on the value of this variable, but cannot understand the syntax to do!

    Don't know if I'm clear - hope that makes sense... ;-) Thank you

    Hey p3pp3r,

    I think I understood you. Try the following and see if you get good results:

    function myFunction(arr:Array, fieldName:String)
    {
        arr[0][fieldName]  = "xxx";
    }
    

    Let me know how it turns out. Good luck!

  • Apex 5 schedule: different color based on the value of data field

    Dear Experts,

    I need to have a different color for each record on the calendar based on the value of the data field (eg. category).

    How can I achieve this?

    Thank you!

    See: -.

    You don't have to wait for APEX 5 integration FullCalendar ~ Blog of Doug Gault...

  • change the color of line based on the value of column 5 Apex in the classic report

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Hello

    I know this question has been asked several times here, but I'm working on 5 Apex and need to know the correct way to do it in this version.

    I need to change the color of the text of the entire line (no background color) based on the value in one of the columns of the classic report. I have just two conditions, if the value of column = Yes, color should be red, otherwise it must be green.

    I am new to jscript and css, so appreciate if someone can tell me the solution with steps.

    I have already checked this link that changes the value of the column, need to do something similar to the whole line.

    https://tylermuth.WordPress.com/2007/12/01/conditional-column-formatting-in-apex/

    Hi coolmaddy007-Oracle,.

    Here's an example set up on the apex.oracle.com according to the specifications you gave: https://apex.oracle.com/pls/apex/f?p=35467:1

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Here is how it is done:

    Create a dynamic action with the following specifications:

    Name: Give the appropriate name

    Event: After refresh

    Selection type: region

    Region: select your region classic report

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $('td[headers="JOB"]').each(function() {
      if ( $(this).text() === 'MANAGER' ) {
        $(this).closest('tr').find('td').css({"color":"red"});
      }
      if ( $(this).text() === 'SALESMAN' ) {
        $(this).closest('tr').find('td').css({"color":"green"});
      }
      if ( $(this).text() === 'CLERK' ) {
        $(this).closest('tr').find('td').css({"color":"blue"});
      }
    });
    

    NOTE: Download the selector appropriate for your knowledge $('td[headers="JOB"]') case using firebug/browser development tools.

    Items concerned: leave blank.

    PS: Changed the example to change the color of text instead of the background color.

    I hope this helps!

    Kind regards

    Kiran

  • Can the color of the text based on the value

    I searched for a way to change text color based on the value fields

    If Textbox =, then A will be blue

    If Textbox = B, then B will be red

    I just need help get the fi then code work, change of color after it is easy

    Any Suggestions...

    To change the boder, add the following script to the exit event:

    If (TextField1.rawValue is "Desired value")
    TextField1.border.edge.color.value = "255,0,0";
    .
    .

    For the fill color, add the following script to the exit event:

    If (TextField1.rawValue is "Desired value")
    TextField1.border.fill.color.value = "255,0,0";

  • Difficulty over the months in time Sun based on the value of as txt

    Hi all

    We have two text measures startmonth and endmonth, how can resolve us to the time dimension based on the values of these measures of text? Difficulty for example (Mar: dec)

    Thank you

    James

    Hi James

    I'm sorry, it looks like you may need to go on a training Essbase. As I said you can NOT SET on data which are entered.

    You must FIX on all period member using something like @RELATIVE(YearTotal,0), then in your writing sets the IF statement as well as the data is calculated only at the period, you are at (The FIX on all periods will cover all periods) lies between the values entered by the user (i.e. the start month and end month values).

    An example below is to say in the depreciation calculation.

    "SYS_MONTH" is a member who places the VALUES against each Member period so that you can compare and match against the input values IE like VLOOKUP in Excel, then Jan = 1, Feb = 2... ***

    DIFFICULTY (FY13, @RELATIVE("Product",0), @RELATIVE("YearTotal",0)) I do not know you other dimensions you are trying to calculate against so you should add them

    "Depreciation")

    IF ("Start_Month"-> "Input_period"-> "Input_Year"-> "Input_product" "Input_period"-> "Input_Year" <= "sys_month"="" and="" "end_month"-="">-> "Input_product" > = "SYS_MONTH")

    "Depreciation" = xxxxxxxxxx Code to calculate depreciation;

    ON THE OTHER

    "Depreciation" = #missing;

    ENDIF)

    ENDFIX

    Imaging you are in a worksheet with Jan, Feb, Mar in the upper part and in the left column, you have the beginning and the end of the month entries. Calculation will increase from left to right and IF his calculation period that is to say that the SYS_MONTH member is between the beginning and the end of the month (4 and 11 below) then the depreciation is calculated, if it is then #missing, or you can choose not not to calculate.

    Input_Period Jan Feb Mar Apr May Jun Jul Aug Ms Oct Nov Dec
    SYS_MONTH #missing 1 2 3 4 5 6 7 8 9 10 11 12
    Start_Month 4
    End_Month 11
    Depreciation #missing #missing #missing #missing x x x x x x x x #missing
  • Change the Label element based on the value of another element

    Hi guys,.

    I need to put a label of point (A) based on the value of another article (B). I did the following:
    I created a dynamic action.
    When B changes:
    1. present the value of B
    Article 2-updated
    Is element A label: myitem & b.

    Any ideas?

    Best regards
    Fateh

    His work! Check it out now

    Just do it

    $('#mylabel').children('label').children('span').text($v('P1_A'));
    

    Published by: VC on June 9, 2012 11:21

  • 2 definitions of view based on the value of the table

    Hi all

    Is it possible to have 2 different definitions of each entry of 2 base tables display different, based on the value of the table?

    We have 2 tables with similar columns, one with historical and other data was only the latest / greatest according to yesterday (it is populated by ETL from mainframe). Changes made by the java application online is now going into the table containing historical data immediately, but edits made in mainframe comes to the table with the data current next day.

    There are 2 products, an is based on the last and largest of the historical table based on cre date and date of mod and other product relies on the table with the current data (not historical).

    Tried using joins for these two tables but the performance wasn't good and each product needs table data alone, and so I wanted to eliminate joins.

    We wanted to use the same name for the view from the metadata using the shared functionality based on the name of the view.

    Is there a way define a view under certain conditions?

    It is:

    If the value for a particular parameter is 0 then

    Select c1, c2, c3 of < historical table > other

    Select c1, c2, c3 of < no history table >

    Any ideas?

    You are looking for something like this?
    Re: how to pass parameters in a view

  • Change the type of region based on the value of the element

    Hi all
    Is it possible to change a type of model of a region based on the value of the page element?
    For example, if I have a template type for the area has as the type of model and the region to hide/show for area B as hide/show as well.

    I want that type of region B model will be replaced by a type of custom template based on the value of an element in A region.
    Is this possible?

    Enjoy your entries.

    Thank you!

    Spriya wrote:
    Hi all
    Is it possible to change a type of model of a region based on the value of the page element?
    For example, if I have a template type for the area has as the type of model and the region to hide/show for area B as hide/show as well.

    I want that type of region B model will be replaced by a type of custom template based on the value of an element in A region.
    Is this possible?

    N ° you either need to have 2 instances of region B, based on different models and make one of them conditionally based on the value of the area A; or to develop a unique model with a structure that is flexible enough to be used in both cases and change its appearance and behavior, for example, Exchange classes in dynamic Action.

  • Web page open based on the value of the text field

    I want to open a web page that is based on the value of a text field.  How to bind the value of a text field to a command which will open the web page?

    For example, the value of the text field is: 8 t - EXT

    and the web page I want to open when you press a button is: http://hqms/doc.asp?dn=8T-EXT

    As you can see that the 8 t - EXT is something that a person enters the form and is what is needed to open the web page.  The other text in the link of the webpage is always the same.

    Thank you

    Hello

    In the click event of the button, place the following JavaScript code:

    if (TextField1.rawValue !== null) {
         var vURL = "http://hqms/doc.asp?dn=" + TextField1.rawValue;
         app.launchURL(vURL, true);
    }
    else {
         app.alert("Dear user, please put a code in the text field. Thank you!");
    }
    

    You need to change the object references based on your shape.

    Niall

  • Redirect to 3 different pages based on the value of the Auto complete field.

    Hi friends,

    I use a "Auto complete field" in a page for research (Apex version 4.0). But I need to get the values of the 3 tables and when you click on the redirection of the value to one of the 3 pages based on the value.

    For example, I have 3 tables. 1 customer 2 Sites 3.Employees. When I enter "c" in the search field, I need to get values of 3 tables in this area "AutoComplete". That is to say, if I have a customer with the name "cusotmer1", "customer2" and the location with the names of "cisc1", "cisc2" and employees with the name "cid1", "cid2"; When I enter "c" in the FQDN of the auto all 6 values must be given in the "AutoComplete" box and clicking on "customer1" / "customer2" need to redirect to the 'customer' page When you click on 'cisc1' / 'cisc2' redirect to 'site' when clicking on "cid1" / "cid2" redirect to the page of the employees. Is there a way to do this. Help, please.


    Kind regards
    NAV

    Net asset value,
    Here is a sample page that uses the code I proposed works fine for me with FF and IE (8.0).

    http://Apex.Oracle.com/pls/Apex/f?p=18:3

    Note: I've added a warning message before being submitted

    This page works by your side?

  • A drop-down list can do the calculation based on the value selected in a drop down list?

    Form Acrobat X Pro Adobe

    Can I have a drop down list create a calculation based on the value selected in the menu drop-down?

    We have a set lunch and want the user to choose to be "A lunch', 'Lunch B'"C Lunch"or"just the milk. "

    It is for each of the 5 days of the week. There are therefore 5 drop downs, which have all the same 4 above choice.

    If the user chooses among the 3 lunches and then put $2.00 in the total box at the end of the line. If 'Just the milk' may put 0.50 in the box.

    The total area at the end of the line must keep a record of all 5 days and give a total.

    So if someone chooses lunch A LUN, sea and Sun and just milk for Tuesday and Thursday and then the total for this week must be $7,00

    Is it possible by using code or something?

    I did it in Excel, but we need it is an Adobe pdf file.

    TIA

    OK the total box has a 10 all the time to make it look like $ 2.00 for

    everything.

    Before even that I chose something there are 10 in the box.

    I am a newbie to Adobe scripting Total used VB/A .NET etc ' 1980

    However.

    Can you do any debugging in code?

    Initialize the sum

    var sum = 0;

    Make a loop on the drop-down list boxes and add the cost of the invoice sum

    for (var i = 1; i)< 6;="" i="" +="1)">

    Sum += getField("Week1Day"_+_i).value == 'just milk? 0.50: 2,00;

    }

    Set this field to the amount

    Event.Value = sum;

  • Show/hide subform based on the value of digital field

    Hi all


    I created my first form in LiveCycle Designer, but jammed with coding. Any help would be greatly appreciated.

    In the attached form, based on the value of field digital "number Total points" (calculated from the user of entry), I want two things to happen.

    The 'field' text should display different text depending on the points,

    • Less than 10 points is "beginner."
    • 10-14 is "intermediate."

    and just like that...

    If the total number of points is less than 10, 'Course for beginners' and 'Language' DropDownList must appear.

    Is there a way to do this? I tried posting 'If' 'else' statement, but it does not work. I looked in the previous discussions, but cannot find that anything will be based on the numeric value.

    You are looking for assistance.
    R

    The joint responds to your needs. The JavaScript on the TextField1 calculate event anime.

    Form1. #subform [0]. TextField1::calculate - (JavaScript, client)

    If (NumericField1.rawValue! = 0) {}
    If (NumericField1.rawValue< 10)="">
    DropDownList1.presence = "visible";
    DropDownList2.presence = "visible";
    this.rawValue = "beginner."
    }
    else {}
    DropDownList1.presence = 'hidden ';
    DropDownList2.presence = 'hidden ';
    If (NumericField1.rawValue< 15)="">
    this.rawValue = "middle";
    }
    else {}
    this.rawValue = "";
    }
    }
    }

    Steve

Maybe you are looking for

  • Importing Photos "Favorite."

    Hi all I am a user of iPhone for a long time, but never really used the "Favorites" for photos function. In a recent first time parent, I was in a frenzy of favoriting! I was under the impression that when I mark something as a favorite, it would not

  • Upgrade RAM to HP pavilion 15-n209TX

    My HP Pavilion 15 n209tx book has 2 memory slots for RAM modules. A slot contain Hynix 4 GB 1600 MHz RAM. I want to update total RAM 12 GB. I'm of the India & amp; Consider purchasing 8GB DDR3L 1600 MHz SODIMM 12800, PC3L Non - ECC SDRAM 1.35v. I hav

  • shut down my pc

    My m - 58 lenovo pc is fairly new and we are using windows xp. in recent weeks I try to stop, the pc goes into hour long routine (i.e. infinite) where he says it stops - but this isn't - about 3 times out of 4. the other time it stops normally. I don

  • How to access the files or records of the administrator

    Hello My Toshiba Satellite A-105 recently crashed and I need to reformat the drive, but first I wanted to backup my files from the hard drive. I bought an external hard drive enclosure, set up and plugged in my other computer (healthy). It worked fin

  • I don't find a driver for my printer HP DesignJet plotter 1050c on Windows 7.

    I don't find a driver for my printer HP DesignJet plotter 1050c on Windows 7. HP says they don't have one.