Select List LOV will not accept query that seems to be valid

Hi,
I modified an LOV query to add the number of results to the display_value return column. I have verified that the query works in SQL Workshop/SQL Commands, but when I paste it into the LOV it will not save changes. It says the LOV query is invalid....
To get it to apply I had to turn it into a Named LOV, and the page would load, but I get the error:
Error: ORA-06550: line 1, column 77: PL/SQL: ORA-01744: inappropriate INTO ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored performing List of Values query:
The query I am trying to perform is:
select STATUS.STATUS_NAME||' ('||
(select count(*)
from TICKET
where TICKET.USER_ID = (select USER_ID from LOGIN where upper(LOGIN.USER_NAME) = upper(:APP_USER))
and TICKET.STATUS_ID = STATUS.STATUS_ID)||')' display_value,
STATUS.STATUS_ID return_value
from STATUS
order by STATUS_ID
Here are the results when ran in SQL Commands:
DISPLAY_VALUE RETURN_VALUE
Defined (7) 0
Accepted (1) 1
In Process (0) 2
Completed (1) 3
Cancelled (0) 4
Thanks in advance for any help.

David,
Try the following and let me know what you get:
SELECT status.status_name || ' (' ||
   (SELECT COUNT(*)
    FROM ticket
    WHERE ticket.user_id IN
      (SELECT user_id
       FROM login
       WHERE UPPER(login.user_name) = UPPER(:app_user))
   AND ticket.status_id = status.status_id)
|| ')' display_value,
   status.status_id return_value
FROM status
ORDER BY status_idAlso, if you find you're using the user's id a lot, I would recommend creating an application level item called USER_ID (make it protected). Then I would add a little code in the post authentication process that sets the value of that item.
I'm not sure that there would really be much of a performance benefit, but you would have effectively SPODified (Single Point of Definition) the lookup allowing you to reference it where ever you need making your code look better and the maintenance easier.
Then the query would look like this:
SELECT status.status_name || ' (' ||
   (SELECT COUNT(*)
    FROM ticket
    WHERE ticket.user_id = :USER_ID)
   AND ticket.status_id = status.status_id)
|| ')' display_value,
   status.status_id return_value
FROM status
ORDER BY status_idRegards,
Dan

Similar Messages

  • I am trying to reinstall Master Collection after a computer crash and after download it will not accept the serial number that it lists on my purchased products.  The purchase was in 2012.

    I am trying to reinstall Master Collection after a computer crash and after download it will not accept the serial number that it lists on my purchased products.  The purchase was in 2012.The message says the serial number is invalid.  What do I do nest?

    Hi there,
    Please see help here - https://helpx.adobe.com/creative-suite/kb/error-serial-number-valid-product.html
    If still you are facing problem, I would recommend to reach out to support through the link which is available at the bottom of the support page.
    ^Ani

  • Trouble using pipelined function in an select list lov query

    I'm trying to use a pipelined function in a select list lov query but i cet the error
    "LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query."
    my query is as follows :
    SELECT gt.navn d, gt.GEOGRAPHY_TYPE_ID r
    FROM GEOGRAPHY_TYPE gt
    WHERE gt.kode NOT IN (1)
    and gt.kode in (select lov_value from table(RAPPORT_FILTER_PKG.GET_RAPPORT_FILTER_VALUE_PIP (
    SYS_CONTEXT ('rapport_filter_ctx','filter_id'),'GEOGRAPHY_TYPES')) )
    ORDER BY gt.navn DESC
    if i use a discrete values '80' instead of the call to
    SYS_CONTEXT ('rapport_filter_ctx','filter_id')
    i don't get eny errors, but then the LOV isn't as dynamic as i has to be
    any idears???
    Edited by: [email protected] on Dec 1, 2008 8:50 AM
    Edited by: [email protected] on Dec 1, 2008 11:17 AM

    nope that doesn't do it either
    contains a syntax errror at
    SYS_CONTEXT (('rapport_filter_ctx',:P500_RAPPORT_FILTER_ID),'GEOGRAPHY_TYPES'))
    my theory is that it's got something to do with the way APEX binds values because
    the query
    SELECT gt.navn d, gt.GEOGRAPHY_TYPE_ID r
    FROM GEOGRAPHY_TYPE gt
    WHERE gt.kode NOT IN (1)
    and gt.kode in (select r from table(RAPPORT_FILTER_PKG.GET_RAPPORT_FILTER_VALUE_PIP ('80','GEOGRAPHY_TYPES')) )
    ORDER BY gt.navn DESC
    works fine in both TOAD and in APEX but as soon as i replace th '80' with :P500_RAPPORT_FILTER_ID then, apex won't accept the code??????
    Edited by: [email protected] on Dec 3, 2008 7:54 AM

  • Itunes is asking that I edit payment info, but will not accept any changes to allow me to purchase music? I have changed cards, reentered information, uninstalled and re-installed Itunes. Nothing is working, what do I need to do?

    Itunes is asking that I edit payment info, but will not accept any changes to allow me to purchase music? I have changed cards, reentered information, uninstalled and re-installed Itunes. Nothing is working, what do I need to do?

    See HT203206: iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues.
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • I am having ongoing connection problems with the Clash of Clans app which means that I lose battles, resources or boost times. This results in a loss of gems which I have purchased but will not be refunded as they will not accept responsibility.

    Whilst playing Clash of Clans I will continually lose the internet connection. This means that I lose battles, resources, gold etc and lose boost times. I have informed Supercell who blame my internet connection even though the iPhone, laptop and TV all work fine so it is obviously a technical problem with their game and probably something to do with their last updates.
    As I have purchased gems I feel that I should be compensated for my loss but they will not accept responsibility nor investigate the technical issue. The loss of connection occurs constantly with the game often freezing during replays or searching for battles. This is obviously not a connection issue.
    What suggestions do you have to resolve this situation?

    Hi.
    Thanks for the reply. I asked because I also wanted to see if others had encountered the same problem.
    I have no problems with my internet connection as I run my TV, laptop and iPhone off the same connection with no problems. I believe that since the recent updates to the game this has caused the problem. The game often freezes, cancels out or returns me to the main game screen during battles or replays.
    What I want to know is how do I get the game designers or owners to acknowledge my problem as at this time they keep telling me it is my internet that is a problem and not their game. How do they know this when they refuse to investigate. What can I do and who do I go to for support if they won't accept responsibility?
    I am very grateful to you for replying but concerned that if this can happen to me then how many other gamers are losing out and paying for something that they are not going to receive.
    Many thanks.

  • I have an ipad2 with wifi and 3G.  My wife and I are traveling in France (Nice) then into Italy.  We are unable to purchase a data plan because our Verizon IPad will not accept a sims chip...we are told.  We were advised that this model wound work in Euro

    I have an ipad2 with wifi and 3G.  My wife and I are traveling in France (Nice) then into Italy.  We are unable to purchase a data plan because our Verizon IPad will not accept a sim chip...we are told.  An Apple store employee here said this model is good only in the US. The iPads here take a sim card. We were advised by an Apple Store Employee at home that this model would work in Europe and that we could buy our service here.  That does not seem to be the case.    We have been told that we must invest in a modem at 200.00€ and then purchase a separate service plan for each country. We can use the free wifi wherever it is available but we cannot connect to the outside world when out of range. Is there anything else we can do?
    Thanks, John

    Unfortunately, no other solution is available.
    Hope this helps

  • I need to install iWork 09 so I can open the many pages document files that will NOT open under the new pages 5. Mavericks will not accept an install from my iWork's 09 CD. How do I get around this?

    I need to install iWork 09 so I can open the many pages document files that will NOT open under the new pages 5. Mavericks will not accept an install from my iWork's 09 CD. How do I get around this?

    Hi, I'm helping StringSinger2 with this problem.
    The previously installed version is Pages 3.0.3 (the same as from iWork 08). This version (Pages 3.0.3/iWork 08) is incompatible with Pages 5.
    That is why it would be helpful to install iWork 09, which is the version between the two. It will open the older 08 files, and its saved files are readable by the new Pages5.
    SO...
    When I try to install iWorks 09 from my retail DVD the error message is "the installer is damaged". (I know the dvd is good, I installed iWorks09 to my laptop today.) Is the "installer" part of the system files? And - If that is damaged is there a patch for that?
    Many Thanks!

  • The place holders in my Table of Contents will not accept a photo. I have several chapters with photos in the Table of Contents placeholders, but several at the beginning that will not let me put the photos in. Can anyone help me with this?

    The Place Holders in my Table of Contents will not accept a photo for the first few chapters. I have rebooted the computer and that didn't work. Can anyone help? I have worked so hard on getting everything done for this book and this is the last thing to do and I need help with it.

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • Why will imovie not accept pictures that i want to add to my project

    Whenever I try and add photos to my imovie project imovie will not accept them. When i drag and try to drop them in the place id like to place them the incert section turns green as if imovie recongnizes where i want to place the picture but the picture never shows up.
    I have restarted the computer and I have restarted imovie in hopes of that working but it has not resolved anything.

    Amerydc wrote:
    … When i drag and try to drop them in the place id like to place them the incert section turns green …
    do you drag 'n drop from the Media-Bin within iMovie?
    or from 'outside' iMovie into it?

  • HT202274 Apple ID has my old email address. It will not allow me to change the address and will not accept my password or ID questions.   I recently upgraded to OSX Yosemite 10.10.1.  I also have an Apple ID that works with iTunes and would like to keep i

    Apple ID has my old email address. It will not allow me to change the address and will not accept my password or ID questions.   I recently upgraded to OSX Yosemite 10.10.1.  I also have an Apple ID that works with iTunes and would like to keep it as my primary.

    To change the iCloud ID on your devices you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted (if using iOS 7), then sign back in with your current ID.
    If you don't know the password for your old ID, or if it isn't accepted, you will have to temporarily recreate it in order to delete the existing account.  To do this, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • Premiere elements12 will not accept ADOBE ID that worked for photoshop elements 12, help

    premiere elements will not accept ADOBE ID that worked for photoshop elemets 12

    katmama
    From one of your prior threads, you appear to be working in Windows 8.1 64 bit with your Premiere Elements 12.
    Where are you when you say that Premiere Elements 12 will not accept your Adobe ID - are you at the Sign In dialog step of the end of the
    installation? Whatever the location, what is being rejected or not recognized specifically - can you tell if it is the Adobe ID or password?
    Are you working with antivirus and firewall(s) disabled?
    Please check out the following troubleshooting steps and let us know if any of them worked for you
    http://www.atr935.blogspot.com/2014/04/pe12-premiere-elements-12-editor-will.html
    ATR Premiere Elements Troubleshooting: PE12: Sign In Failure (Connect to Internet or Fix Computer Clock)
    Do you have more than one Adobe ID with Password Account?
    We will be watching for further developments and will have more comments based on your reply.
    Thank you.
    ATR

  • When starting up after a erase/reinstall of Mac OS X 10.6 it will not accept any of my passwords/names

    when starting up after a erase/reinstall of Mac OS X 10.6 it will not accept any of my passwords/names, I had just entered my info and clicked on "continue", the cube began to turn and froze, a translucent screen came over the whole window and request that I restart the computer, after doing so, I got the start up sound and a message saying that OS X was starting up and then the sign in window, but when I entered my info it kept shaking/rejecting it, only thing I can think is that could I have possibly entered my password wrong twice, don't know, I'm still scratching my head.

    Do it again, I'm afraid. Be sure you set up the initial admin account with a proper password you can remember - all lowercase letters and numbers. No special characters or spaces except for the "_" underline character.
    Clean Install of Snow Leopard
    Be sure to make a backup first because the following procedure will erase
    the drive and everything on it.
         1. Boot the computer using the Snow Leopard Installer Disc or the Disc 1 that came
             with your computer.  Insert the disc into the optical drive and restart the computer.
             After the chime press and hold down the  "C" key.  Release the key when you see
             a small spinning gear appear below the dark gray Apple logo.
         2. After the installer loads select your language and click on the Continue
             button. When the menu bar appears select Disk Utility from the Utilities menu.
             After DU loads select the hard drive entry from the left side list (mfgr.'s ID and drive
             size.)  Click on the Partition tab in the DU main window.  Set the number of
             partitions to one (1) from the Partitions drop down menu, click on Options button
             and select GUID, click on OK, then set the format type to MacOS Extended
             (Journaled, if supported), then click on the Apply button.
         3. When the formatting has completed quit DU and return to the installer.  Proceed
             with the OS X installation and follow the directions included with the installer.
         4. When the installation has completed your computer will Restart into the Setup
             Assistant. Be sure you configure your initial admin account with the exact same
             username and password that you used on your old drive. After you finish Setup
             Assistant will complete the installation after which you will be running a fresh
             install of OS X.  You can now begin the update process by opening Software
             Update and installing all recommended updates to bring your installation current.
    Download and install Mac OS X 10.6.8 Update Combo v1.1.

  • After power on will not accept name and password

    Having trouble with MacBook Mac OS X 10.6.8
    At start up will not accept name and or password. Gives IP address info then network accounts unavailable.

    Hi Beebop1991,
    I'm sorry to hear you are having issues with your Administrator User account and password.
    It sounds like your computer is booting up to a network drive instead of your Macintosh HD.
    If this is the case, follow these steps:
    Startup Manager: How to select a startup volume
    Follow these steps:
    Turn on, or restart, your Mac.
    Immediately press and hold the Option key. After a few seconds, the Startup Manager should appear. The Startup Manager scans for available available volumes.
    Use the left and right arrow keys on the keyboard to select the volume you would like to use.
    Press the Return key on your keyboard to start up the computer from the volume you selected.
    If this does not resolve your issue, and you need to change your Administrator password, follow the steps below for Snow Leopard:
    OS X: Changing or resetting an account password
    In Mac OS X v10.6.8 or earlier, follow these steps to reset a password when there is only one administrator account on the computer, or if the original administrator account needs a password reset. "Original" administrator account refers to the one that was created immediately after installing Mac OS X. If the original administrator password is known, that administrator account may be used to reset the passwords of other administrator accounts using the steps described above. These steps require an optical drive; if your Mac does not have an optical drive and you have a Mac OS X v10.6 Install disc, see below.
    Start up from a Mac OS X Install disc (one whose version is closest to the version of Mac OS X installed).  Usually, you can start from the disc by putting it in your computer, restarting, and holding the C key. Or, put it in the computer and click the Install or Restore icon you see in the disc's main window (after which the computer will start from the disc without you needing to hold C). Or, you can use Startup Manager or the Startup Disk preference pane to select the Install disc.
    Choose a language, click the arrow button to continue,
    Mac OS X v10.6 or later: Choose Password Reset from the Utilities menu.
    Mac OS X v10.5 or v10.4: Choose Reset Password from the Utilities menu.
    Mac OS X v10.3: Choose Reset Password from the Installer menu.
    Tip: If you don't see this menu or menu choice, you're probably not started from the disc yet.
    Note: The default keyboard layout is U.S. English while started from the installation disc. If you use a keyboard layout other than U.S English, use the Input menu (the flag icon on the right side of the menu bar) to select the desired layout before typing a new password.
    Select your Mac OS X hard disk volume.
    Select the user name of your original administrator account.
    Important: Do not select "System Administrator (root)". This is actually the root user. You should not confuse it with a normal administrator account.
    Enter a new password.
    Click Save.
    Click the red button in the upper left corner to quit the application.
    Choose Quit Mac OS X Installer... from the Mac OS X Installer menu.
    Click Restart.
    After following these steps, you'll want to also follow the steps in this article.
    Mac OS X v10.6: Resetting the original administrator account password on a Mac that has no optical drive
    These steps require a second computer that has an optical drive.Note: If the second computer is a Mac, make sure Mac OS X v10.5.3 or later is installed. If the second computer is a PC, make sure the DVD or CD Sharing Update 1.0 for Windows is installed.
    Open "Remote Install Mac OS X" from the Utilities folder.
    Follow the onscreen instructions.
    For more information, see Sharing DVDs or CDs with Remote Disc.
    Additional Information
    You can press the Eject key on the keyboard to eject DVD media.  Inserting a startup DVD will add that DVD to the list of startup volumes (as in the image above).  You can also attach FireWire or USB external hard drives to add to the list of startup volumes.
    This startup volume selection is temporary.  To set the default startup volume for your Mac after your computer is running, open System Preferences and choose Startup Disk from the View menu (in Mac OS X) or open the Boot Camp control panel (in Windows).
    I hope you are back on track soon!
    - Judy

  • Interactive Report with Select List LOV's

    Hi All -
    I need to develop an Interactive Report which displays reports based on values selected from a select list (LOV's) on this IR report.
    Following is what I am working on.
    This page has 2 select lists with the corresponding LOV values:
    Date From ==> Q1, 2010
    Q2, 2010
    Q3, 2010
    Q4, 2010               
    Date To ==> Q1, 2010
    Q2, 2010
    Q3, 2010
    Q4, 2010     
    When the user visits this report page first time, "Date From" and "Date To" select lists have null values and the report should display all the records.
    Once the user selects values from "Date From" and "Date To" select lists then the report should be filtered based on the values selected i.e.
    If the user selects *"Date From"* ==> Q1, 2010 and *"Date To"* ==> Q3, 2010, then the report should show all the records whose reporting period falls between "Jan 1, 2010" to "Sept 30, 2010" i.e Q1-Q3 2010 only.
    And the Reporting date format stored in the table is "18-OCT-2010", "12-APR-2010" etc ....
    How can this be achieved. Please share your expertise.
    Thanks,
    -Seenu

    Hi,
    First Create 2 Select List with List Of Queries in LOV Region like
    +'STATIC2:Q1-2010;01-Jan-2010,Q2-2010;01-Apr-2010,Q3-2010;01-Jun-2010,Q4-2010;01-Oct-2010'+ in Date From List lets name it P10_DF and
    +'STATIC2:Q1-2010;31-Mar-2010,Q2-2010;30-Jun-2010,Q3-2010;30-Jun-2010,Q4-2010;31-Dec-2010'+ in Date To List P10_DT.
    (Enable Display Null Value on both the select list)
    Then Now in the Report Source add Where Query some thing like
    select FIELD1,FIELD2 from TBL_REPORTS where Report_Date>=NVL( *:P10_DF* ,'01-Jan-2010') and Report_Date<=NVL( *:P10_DT* ,'31-Dec-2010')
    And also create a button to submit the values
    NOTE: This is not tested but this is how i will come about it in the specified scenario. You can try this and post the results...
    Good Luck.
    Regards,
    Afsar

  • Generic solution for cascading select lists/lovs

    After implementing several times a select list/lov, which is depending on another item on the same page (see the AJAX example from Carl Backstrom), I thought that it was time to come up with a more generic solution where I don't have to implement javascript code and on-demand processes for each lov anymore.
    I want to contribute my findings to the APEX community. More details about my solution can be found at
    http://inside-apex.blogspot.com/2006/11/generic-solution-for-depending-select.html
    Any feedback is welcome!
    Patrick
    My APEX blog http://inside-apex.blogspot.com

    Hi Bjorn,
    the "First schema provisioned" property is just available in "normal" workspaces, not in the "internal" workspace. But it's just the schema-name where the tables/... of your application are stored.
    About your problem. Which version do you use? V2.0?
    V2.0 doesn't have the APEX dictionary views, I think they have been created in V2.2.
    So the only way to use my solution is to use the version which is stored into the FLOWS_... schema. But it has to be modified before.
    1.) In the ApexLib.js file, all ocurrences of $x have to be replaced by html_GetElement => $x doesn't exist in V2.0
    2.) Replace the FLOWS_020200 thru FLOWS_020000 in the header of the package (ApexLib_for_flows_020200.pks and .pkb)
    3) Maybe you have to remove the where-clause restriction NVL(UPPER(ITEM_COMMENT), '@') NOT LIKE '%$APEXLIB_IGNORE_LOV$%', I'm not sure if the comment column exists in V2.0. Don't have a possibility to check that now.
    I will come up with a solution on sunday or monday.
    Patrick

Maybe you are looking for

  • Error 500 - Internal server error when trying to upload images to website

    I have been unsuccessful in my many attempts to upload images to the bustalk website. I keep getting an Error 500 - Internal server error message asking me to try again later but the fault is still repeated.

  • DPM (2012R2 ur 4) Azure Online recovery point creation fails

    HI, I am using SCDPM 2012 R2 UR4 to backup some files on premise. I created a backup vault - installed the Azure Agent on DPM (registered it), I downloaded the Azure Backup Vault credential file and provided it during registration process (it showed

  • Down load doesn't work

    Please I need some help. I don't why, i can't get download. My iBook G4 was working well, but (I do not the reason) now it is impossivel to get any down load from internet. Could someone help me? Thanks in advanced. Andres Jorge

  • Reg: How add methods and events to standard BOR

    HI Gurus, Can any provide me the details How to add methods and events to standard bor ? Please provide me details thanks in advance Rameshg

  • Adobe reader "save as" function is not working

    screen tells me the adobe folder is empty and that the "save as" function is malfunctioning when I try to download pdfs from a particular site. If I'm using EI - it freezed EI on the blank download screen.  I have deleted and redownloaded Adobe Reade