Problem with query select when the value is "I" or "II".

Hello

APEX 4.0.2

I have a select as below,

Select CLASS_TITLE
of VW_TITLE
where instr (upper ("CLASS_TITLE"), upper (nvl (DECODE (: P80_CLASS_TITLE, 'ALL', NULL,: P80_CLASS_TITLE), "CLASS_TITLE"))) > 0

P80_CLASS_TITLE is defined as LOV. When I select "administrative specialist I" in the list, it returns the following.
E specialist I
Administrative Specialist II

But if I select 'Administrative Specialist II', it returns only Administrative Specialist II.

I only have this problem when there is an 'I' or 'II' in the CLASS_TITLE; Otherwise, it returns the correct values.

Thanks a lot for your help.
MT

the mt user says:
Sorry if I you confused. That's what I want the select statement to make. If I select a class title in the list of values, I want to display the title of the selected class. If I do nothing select in the list of values, then display all class titles in the table which is the default value.

I assumed that "ALL" is the default value from the LOV. If the above does not work it appears that it must be null. So much more SQL 101:

select
          t.class_title
from
          vw_title t
where
          t.class_title = :p80_class_title
or        coalesce(:p80_class_title, 'ALL') = 'ALL'

I'm guessing that you came with all the stuff INSTR/DECODE...

You would probably enjoy taking up the + 2 day Developer Guide + brush on basic SQL.

Tags: Database

Similar Questions

  • problem with query select in the search

    Hello

    Here I use MYSQL database and when I insertind to the database date, it saves as "2009-11-10 00:00:00 ' and when I used to do this show in dateformat as November 10, 2009".

    Here's the problem occurs, when I write a search like query

    Select recruitername, interviewdate, skillset
    details
    where interviewdate = #form.interviewdate #.

    I'm not a problem with the date. could u please help me how to solve this problem.

    Or, better yet, a with a type date.

    WHERE interviewdate =

  • problem with adf table when the component is added in the column of the table.

    Hi all

    I use jdev 11.1.1.5.0 version.

    use case: I created an adf table that is based on the original Version. DC now I added a component of group select a radio (which contain 4 approved, rejected, radio button back, no) in the table of the adf.
    I have table with many rows for example in the first row select approved and the next row I select reject now when I get the value of a radio button group in backing bean by using the component binding I had the last selected value. (in this case to reject).

    And the second is that when I set the value for the current by using binding as line radio button

    rb.setValue("R") then reject option selected for all lines.

    so my question is--

    How can I get and set the value of the group to select a radio at the level of the line using the element binding.

    Hello

    I don't see a reason to not use a transitional attribute for the radioGroup in your previous answer.

    Here's the example I tried.

                            
                                
                                
                                
                                
                                
                            
    

    Where DeptnoRadio is the transitional attribute, I created (which will be a few random values between A and E) and EnableDisable is another temporary variable of type Boolean that returns true or false depending on certain conditions.

    Now, for each row, the value is different (and the corresponding radio button is selected) and thereafter, which match the condition, the option is disabled.

    Arun-

  • Problem with query select

    Hello

    Select transactionid, (TO_TIMESTAMP (endtime, "MON-DD-YYYY HH24:MI:SS)-TO_TIMESTAMP (starttime," MY - DD - YYYY HH24 timetaken:MI:SS))))

    from (select a.transactionid, MAX (TO_CHAR (HH24:MI:SS' a.time_stamp,'DD-MON-YYYY)) endtime, starttime MAX (TO_CHAR (a.time_stamp,'DD-MON-YYYY HH24:MI:SS')))))

    A newspaper, logaltkey b where a.time_stamp > TO_DATE ('29.01.2014:11:00:00 ',' DD.) MESSRS. ' YYYY:HH24:MI:SS)

    and

    a.time_stamp < TO_DATE ('30.01.2014:15:33:24 ',' DD.) MESSRS. ' YYYY:HH24:MI:SS)

    and interfaceid = 'Member '.

    and a.logid = b.logid

    and b.altkeyname = 'SXC');

    The query above returns the error below, some one please share your entries to make it work.

    ORA-00937: not a single group group function

    00937 00000 - 'not a single-group function.

    * Cause:

    * Action:

    Error on line: column 2:14

    You do not have to include group by clause in your query internal.

    Try it below:

    Select transactionid, (TO_TIMESTAMP (endtime, "MON-DD-YYYY HH24:MI:SS)-TO_TIMESTAMP (starttime," MY - DD - YYYY HH24 timetaken:MI:SS))))

    Of

    (

    Select a.transactionid,

    Endtime MAX (TO_CHAR (a.time_stamp, 'DD-MON-YYYY HH24:MI:SS')),

    StartTime MAX (TO_CHAR (a.time_stamp,'DD-MON-YYYY HH24:MI:SS'))))

    Of

    Journal of a,

    logaltkey b

    where a.time_stamp > TO_DATE ('29.01.2014:11:00:00 ',' DD.) MESSRS. ' YYYY:HH24:MI:SS)

    and

    a.time_stamp<>

    and interfaceid = 'Member '.

    and a.logid = b.logid

    and b.altkeyname ='SXC

    A.transactionid group

    )

  • Problem with headphone selection if the table has only one row

    Hi all

    I have developed a table in which I use selection listener to perform a task when a line is selected.
    It works fine when I have more than 1 row in the table, but when I did that one line in the table, the listener of selection do not call the corresponding method in the bean.
    I understand this selection event is raised only when the line is changed, but in the case of use when only one line is there, what do I do to make the listener of selection work?

    The selection listener I wrote the code to make the line selected as current line and perform the required task.

    Please suggest a way out of this situation.

    Thanks in advance.

    Hello

    try to remove this table attr

    selectedRowKeys="#{bindings.xxx_VO1.collectionModel.selectedRow}"
    
  • Help with query - Conversion of the value of the line to the value of the column for the same column

    CREATE TABLE TESTY
    (
      BATCH_ID  VARCHAR2(100 BYTE),
      LINE_NUM  NUMBER,
      STRING    VARCHAR2(100 BYTE),
      AMOUNT    NUMBER
    )
    /
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DBA', 1, '101-201', 100)
    /
    
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DBA', 1, '101-202', 200)
    /
    
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DEVELOPER', 2, '101-201', 110)
    
    /
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DEVELOPER', 2, '101-202', 210)
    /
    
    Insert into testy
       (BATCH_ID, LINE_NUM, STRING, AMOUNT)
     Values
       ('DEVELOPER', 2, '101-203', 310)
    /
    COMMIT
    /
    
    BATCH_ID     LINE_NUM     STRING     AMOUNT
    DBA          1          101-201     100
    DBA          1          101-202     200
    DEVELOPER     2          101-201     110
    DEVELOPER     2          101-202     210
    DEVELOPER     2          101-203     310
    
    Required Output 
    
    BATCH_ID     LINE_NUM  AMOUNT1 AMOUNT2
    DBA          1         100     200
    DEVELOPER    2         110     210
    Only need to this result for string IN (101-201', 101-202').

    Can anyone help. ?

    Thank you

    Hello

    In Oracle 8.1 or more

    SELECT       batch_id, line_num
    ,       SUM (CASE WHEN string = '101-201' THEN amount END)     AS amount1
    ,       SUM (CASE WHEN string = '101-202' THEN amount END)     AS amount2
    FROM       testy
    GROUP BY  batch_id, line_num
    ORDER BY  batch_id, line_num
    ;
    

    From Oracle 11.1, you can also use SELECT... PIVOT.
    For more information, see the FAQ forum {message identifier: = 9360005}

  • Problems with duplicate DATA when the data file was added after the backup completes

    Hello

    I am facing a problem when running of duplicate database with the command of database duplicate RMAN on a 10 g database. If I have the duplication from a full backup that is missing a data file that has been added to the database after the full backup of preforms, I get the following error message:
    Starting restore at 10-10-2009 18:00:38
    
    released channel: t1
    released channel: t2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 10/10/2009 18:00:39
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06100: no channel to restore a backup or copy of datafile 43
    Redo log which was Pond at the time of the creation of 43 of the data file is also available in the backups. It seems that RMAN cannot use the log information archived redo to restore the content of the data file 43. I guess that because failure is already reported in the RESTORATION and not in the RECOVERY phase, so again the archived logs are not available yet. I get the same message even if I do another backup of the data file 43 (so a backup that is not in the same backupset as the backup to all the other data files).
    The script, the command duplicate product, I guess that RMAN reads the contents of the source database controlfile and trying to get a backup that contains all the data files to restore the database Assistant - if such a backup is not found, it fails.


    Of course, if I try to perform a restore/recovery of the source database, it works without problem:
    RMAN> restore database;
    
    Starting restore at 13.10.09
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=156 devtype=DISK
    
    creating datafile fno=43 name=F:\ORA10\ORADATA\SOVDEV\SOMEDATAFILE01.DBF
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to F:\ORA10\ORADATA\SOVDEV\SYSTEM01.DBF
    .....
    The 43 data file is re-created and then redo is applied to the course.

    So, does anyone know if the duplicate database can use archived redo logs to recreate the contents of a data file, as does a normal restore/recovery? If this is the case, then it is necessary to perform a full backup before each duplicated if a data file has been added after such a backup database.

    Thanks in advance for any answers.

    Kind regards
    Swear

    Hi swear,.

    I got exactly the same problem during replication.
    Because we backup archive logs every 6 hours with rman, I added an additional block of running this script.
    run
    {
    backup incremental level 0
    format "% d_ % s_ %%t p_ bk_ '.
    filesperset 4
    database not saved;
    }

    (I also hit a bug in the catalogue which was resolved by patching up the dbs catalog 11.1.0.6, 11.1.0.7 for.)

    This will restrict the data not making file not part of any backup rman 6 hours while jumping for which there is already a backup of data files.

    Kind regards

    Tycho

  • problem with bind variables in the SQL query view object

    Hi all

    I use JDev 11.1.2.4.0.

    I have a problem with bind variables in the SQL query view object.

    This is my original SQL

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE t.nctuser_id = '20022' 
          AND to_char(t.insertdate,'YYYYMMDD') in ('20130930','20130929')
    group by t.legertype_id
    

    In my view .xml object query tab, I am writing this

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE   t.nctuser_id = '20022'
        AND to_char(t.insertdate,'YYYYMMDD') in :dddd
    group by t.legertype_id
    

    Davis here is a variable of Type liaison: String, updatable and necessary.

    I try to deal with Davis as ('20130930 ', ' 20130929') hoping the view object, run as my original SQL.

    But failed. The view object retrieves 0 line after that I run.

    Why?

    Thank you! ('2original SQL0130930', '20130929') ('20130930 ', ' 20130929')

    A variable binding cannot be used as this is why you must use years table. Check decompilation binary ADF: using oracle.jbo.domain.Array with ViewCriteria to see a solution.

    Timo

  • Is anyone else having problems with Windows 8 when your typing and e-mail? For some reason, it comes out constantly to the tile screen while I type making me about starting more.

    Is anyone else having problems with Windows 8 when your typing and e-mail? For some reason, it comes out constantly to the tile screen while I type making me about starting more.

    Hi Chaz,

    I thank you for your message and gives us a chance to help you. I see that the Mail app closes while you are typing an email.

    Please answer these questions to get a better understanding of the issue.
    1 have changes made to your computer before this problem?
    2 shut down other applications while they are in use?
    3. do you get an error code?

    You can try these methods to check whether the problem is resolved.

    Method 1: Run the troubleshooter of app.

    http://download.Microsoft.com/download/F/2/4/F24D0C03-4181-4E5B-A23B-5C3A6B5974E3/apps.diagcab

    Open this link to launch the troubleshooter.

    Method 2: Update the application.

    Method 3: Reinstall the application.

    This link has the steps that you can follow to update and reinstall the application.

    http://Windows.Microsoft.com/en-us/Windows-8/what-troubleshoot-problems-app

    Feel free to use the forum for any other issue of Windows, you may have.

  • I have problem with Muse files when you work at home with my laptop and when I open the files again in my work with my IMac.

    I have problem with Muse files when you work at home with my laptop and when I open the files again in my work with my IMac.

    I do: when I am uncomfortable with the laptop I save the files on the laptop, then on my external hard drive. Then, when I'm at work, I opened the drive, but the Muse says every time, that so many links in the 'active' is missing. And it takes a lot of time to get all the missing link. Like today I had to open a file of Muse from the external hard drive, and there are about 100 links that are missing.

    How can I solve this problem

    the best thing if you are a user of creative cloud is to store the files in a folder in your account of cloud instead of transferring the files from one computer to another.

    If you are not a Subscriber cc then Dropbox or iCloud will work as well.

  • Checkbox validation based on the selection of the values LOV

    I'm trying to validate a checkbox custom on the opportunity page, based on the selection of the values LOV.

    For example only when the user selects 'rating = A', the box should be able to select and save.

    If the user selects other that 'A' in the field assessment, the box should not save.

    or

    Is it possible to do, the READ ONLY checkbox, enable only when the side 'A' is selected.

    Any thoughts / help on this.

    Thank you, Kumar

    Edited by: user10833334 may 4, 2010 06:43

    There is no function to make a read-only field based on the contents of another field, it is not an option. I will list my thoughts on how you might handle this below.

    -Option 1: I recommend that you use validation to manage it. I don't know exactly to your needs, but you could write a field validation that checks to see if the flag is checked and rating <>has and sends an error message to the user, if it is not. The user would not be able to save the file until it Unchecks the box or sets the side = A.
    Advantages: User gets a message explaining the problem with the data and is forced to fix it before you save it.
    Cons: Requires interaction from the user to save and if they do not pay attention, the data may be lost if they cancelled without saving the changes.

    -Option 2: Another option would be to use the workflow to validate the registration. In this scenario, you can create a workflow that determines whether the field is out of adjustment, and if it is not correctly set, the workflow would update the box accordingly. In this scenario, you would use the 'Actions if Condition is False' also to inform the user that the flag cannot be controlled unless the side =. Then, you must set the Action "Update the values" update the uncontrolled field.
    Pros: Manages the work without user interaction.
    Cons: The con in this case, is that there is no workflow 'Before NEW record saved' trigger, so it is likely that the user sets the value incorrectly when creating the folder and it would stay like that until they update the record again.

    Some people might argue that there is another option that uses the functionality of dynamic page layout to make the field read-only, but this isn't a good option. You would need to convert using the Type of the opportunity in a way that would make use of the possibilities of lourdes for your users and I mention it only to you recommend to avoid his review completely.

    Good luck and let me know if you have any questions.
    Thom

  • Data affinity: Duplication of entities when the value of associatedKey?

    I'm trying to implement data affinity. I have a domain of the FootballClub and player model. A player is held by a FootballClub. Players and Clubs are cached in separate NamedCaches and I use serialization of java base.

    Affinity seems to work - I connect the partition using a BackingMapListener and you can see that a player is going to the same partition as the club owner. If I start a new data node, and the score moves to the new node, that the player and the Club move together.

    The problem I have is that if I change the owner of an existing player and put in my reader updated in the cache of the drive, I don't update the existing player entry in the cache - I get a brand new player. This is the expected behavior?

    If it is not planned, anyone have any suggestions as to where I could go wrong? I tried with a KeyAssociator and by setting up KeyAssociation on Player.Id.
    I also tried excluding the clubName (associatedKey), in the methods Player.Id.hashcode () and equals() and make the transitional clubName in this class.

    I connect MapEvents and you can see that the toString() of the binary version changes key player when the value of KeyAssociator.getAssociatedKey () changes slightly, but convert the key to original format using BackingMapManagerContext.getKeyFromInternalConverter () always returns the same value.

    I'm new on consistency so quite possible something basic wrong I.

    user6871200 wrote:
    I'm trying to implement data affinity. I have a domain of the FootballClub and player model. A player is held by a FootballClub. Players and Clubs are cached in separate NamedCaches and I use serialization of java base.

    Affinity seems to work - I connect the partition using a BackingMapListener and you can see that a player is going to the same partition as the club owner. If I start a new data node, and the score moves to the new node, that the player and the Club move together.

    The problem I have is that if I change the owner of an existing player and put in my reader updated in the cache of the drive, I don't update the existing player entry in the cache - I get a brand new player. This is the expected behavior?

    This is the expected behavior: If you have actually changed the key, it's a different key, and you put the same player with a different key in the cache. Why it would affect old Scripture?

    A key in the plan is considered as immutable and you violate this principle.

    The problem is that your modeling is defective: owner should not be part of the key, or must be immutable. In your case, it should not be part of the key (but then you can't affinity). Question is: why do you want to have an affinity between the owner and player, anyway?

    Best regards

    Robert

  • How to hide the div tags when the value inside is empty?

    I'm creating a tab bar using jQueryTabs.

    I want to hide a tab when the value inside is empty.

    It is perfectly feasible to hide the real on the ground when notting to show is, however, the tab is always in the tabs on top.

    Here is the code:

    as you can see in the tabs 4 and 5 I'm hidding values that are inside the field is it not there no. The tab is still there

     <script type="text/javascript">
    // BeginOAWidget_Instance_2140022: #jQueryTabs
    
    
    
    
              $(function() {
          $("#jQueryTabs").tabs({
                        event:"click",
                        collapsible: false,
                        selected:'0',
                        fx: { opacity: 'none', duration: 1 }
            }).tabs( "none" , 1 , false ); 
              });
    
    
    // EndOAWidget_Instance_2140022
           </script>
          <div id="jQueryTabs">
            <ul>
              <li><a href="#tabs-1">Description</a></li>
              <li><a href="#tabs-2">Specification</a></li>
              <li><a href="#tabs-3">Video</a></li>
              <li><a href="#tabs-4">Audio</a></li>
              <li><a href="#tabs-5">Downloads</a></li>
            </ul>
            <div id="tabs-1">
              <p><?php echo $row_Recordset1['Full_Description']; ?>
            </div>
            <div id="tabs-2">
              <p><?php echo $row_Recordset1['Specification']; ?></p>
            </div>
            <div id="tabs-3">
              <p><?php echo $row_Recordset1['Video']; ?></p>
            </div>
            <div id="tabs-4">
              <p><?php if (!is_null($row_Recordset1['Audio1'])) { ?><a href="<?php echo $file_wav.$row_Recordset1['Audio1']; ?>"><img src="files/Images/audio_image1.jpg" width="50" height="50" ></a><?php } ?></p>
            </div>
            <div id="tabs-5">
              <p><?php if (!is_null($row_Recordset1['Brochure'])) { ?>
              <a href="<?php echo $file_pdf.$row_Recordset1['Brochure']; ?>"><img src="files/Images/pdf_image1.jpg"></a>Brochure<?php } ?></p>
              <p><?php if (!is_null($row_Recordset1['User_Guide'])) { ?><a href="<?php echo $file_pdf.$row_Recordset1['User_Guide']; ?>"><img src="files/Images/pdf_image1.jpg"></a>User Guide<?php } ?></p>
            </div>
    
    

    RiaandSteve1 wrote:

    Thanks for your quick response,

    I tried this,

     

    ">

    I'm not able to click on the tab now, but he is always visible (in this case telling audio). I must be something to do with this code

  • Audio
  • above the actual div for the tab.  Do not know how to remove the tab

    Well Yes if you want to hide the tab too then you must surround the

  • tag in a similar way:

  • Audio
  • How the LED lights up when a threshold is reached, then turns off only when the value does not reach the threshold for a while?

    Hi, I want to write a program that can turn on the LED when a range of value, this is the threshold and only when the value does not reach the threshold for a period of time, say 5 seconds, then the LED will turn off, otherwise it will remain. How can I achieve this in labview? Can someone help me? Really thanks!

    I assume that you use a while loop to keep the updated value.

    Add a record to offset to your looping it initialize with a U32 (time in ms)

    Add the registry to offset to your loop that keeps the previous value of your bool

    When your reaches the threshold value => the light and set the current time in your shift register.

    In the next iteration of the loop weather check value is still above threshold

    => Y-online previous set to true?

    => Y-online the next iteration

    -Online N => turn switch on and set the current time in your shift register.

    -Online N => subtract the time current less time shift record-online more then 5 seconds?

    => Is => keep turning on

    -Online N => turn given

  • Problem with Windows Update after the new installation of Windows 7 Pro the Lenovo ThinkPad X 200

    I'm trying to do a fresh install of Windows 7 Pro on a Lenovo ThinkPad X 200. The product key is easy to find on the sticker of the ThinkPad. However, the version of Windows is hidden (for example, I can't check that my ThinkPad had originally installed Windows 7 Pro). I was able to install by using a Pro Win 7 SP1 CD ROM I bought for another installation. I used the ThinkPad I was trying to make the new facility on the product key. I was able to activate the Windows 7 Pro using the phone call and my cell phone. I checked the activation! However, I have problems with Windows update. The product key may be a different version of Windows 7. If so, why did it install and activate OK? Y at - it a fix for this problem or I have to buy a new version of Windows 7 Pro? Please note that I have not yet installed all drivers Lenovo ThinkPad as I can't seem to install correctly. Thank you!

    Since the issue is updated to Windows, it is not a product number key.

    You can reset the Windows Update components by running the Fixit on this page. But if there is malware present, she will continue to reset the connection to the update servers:

    How to reset the Windows Update components

    http://support.Microsoft.com/kb/971058

    Suggest you download and save the Fixit. Then configure the system before the clean boot by running:

    How to troubleshoot a problem by performing a clean boot in Windows Vista/Windows 7

    http://support.Microsoft.com/kb/929135

    Once the Fixit has been downloaded and the system is started in the pure State, check that the native Windows Firewall is now on if a 3rd party firewall has been used previously. Now run the Fixit and choose the default mode. Restart once it's done and see if the system can be connected to the update servers. If he can't, then rerun the Fixit and choose aggressive mode. Turn it back on when he finished the race and updates.

Maybe you are looking for

  • Looking for HP calculators Forum

    Hi all. While I can always bookmark in Firefox and in my brain, what is the Web Forum of Calculators site/page? Thank you

  • Dell Vostro

    When it is connected to the battery will not charge.   What can I do to fix this?

  • What accessibility tools should I use in Windows Vista?

    Original title: accessibility + my hands hurt + having hard type What tools/tools accessability could I try to use, I had problems with both of my hands and arms. They were cramping and a lot more for several months. He was not a constant, but the fr

  • Receiving e-mails on the network home

    I have a network made up of a desktop computer running XP Professional with a Verizon router and a Dell Vista laptop.    My office shows new messages received more than my laptop.  For some reason any messages more get at my desk as my laptop.  He wo

  • How to install a Windows Installer in windows 7 desktap?

    I'm having a hard time, open the PDF (adobe reader) is because it is said that Windows install is not properly installed.