Having troubles passing values of Shuttle control to SQL Query of Report and Chart Region

Hello,
I am very new to APEX and need help for one of the Pa.I have a shuttle control on my page which populates Categories. Once user selects Categories from this control, I wish to pass the values to following SQL query :
select * from emp_class where category IN ( LIST of VALUES FROM RIGHT SIDE SHUTTLE).
I tried various ways of doing this including writing a java scripts which reads shuttle value, converts it into below string
'Category1',Category2',Category3'. Then I set this value to a text box. And then I was expecting that below trcik would work
select * from emp_class where category IN (:TXT_VALUES)
I am sure this is not right way and hence its not working. Can you please guide me here with options?
Many Thanks,
Tush

b96402b4-56f7-44ba-8952-fb82a61eeb2c wrote:
Please update your forum profile with a real handle instead of "b96402b4-56f7-44ba-8952-fb82a61eeb2c".
I am very new to APEX and need help for one of the Pa.
Don't understand what this means. What is "Pa"?
select * from emp_class where category IN (:TXT_VALUES)
I am sure this is not right way and hence its not working. Can you please guide me here with options?
This is a common fallacy. In
select * from table where columnvalue in (7788, 7839, 7876)
(7788, 7839, 7876) is an expression list and the predicate is evaluated as a membership condition.
In
select * from table where columnvalue in :P1_X
:P1_X is a scalar string, incapable of containing multiple values.
In an APEX standard report, a PL/SQL function body returning an SQL query report source with lexical substitution can be used to produce a "varying IN-list":
return 'select * from table where columnvalue in (' || :P1_X || ')';
where P1_X contains fewer than 1000 values, has been sanitized for SQL injection, and string values are properly quoted.
Some people suggest the following approach, which will also work in APEX interactive reports:
select * from table where instr(':' || :P1_X || ':', ':' || columnvalue || ':') > 0
However this is non-performant as it eliminates the possibility of the optimizer using indexes or partition pruning in the execution plan.
See varying elements in IN list on Ask Tom, and emulating string-to-table functionality using sql for efficient solutions.

Similar Messages

  • Having trouble passing values between methods

    So if this isnt the right spot for this.
    Anyhow any coments on where I went wrong or need to fix will be apriciated.
    So I got two methods that return a value (getHour() and getMinute(). The values that are returned I am tring to pass into showTime. However it doesn't seem to work as all I get is zero's.
    I've done a search around on the net and Im starting to thing my intellagnce is limited.
    import java.util.Scanner;
    public class First
    static int sH, sM;
        public static void main(String args[]){
            getHour();
            getMinute();
           showTime(sH,sM);
        static int getHour(){
            Scanner input = new Scanner(System.in);
            System.out.println("Please enter the hour: ");
            int setHour = input.nextInt();
            if(setHour <= 24){
                System.out.println("You entered " +setHour+ " for the hour.");
            }else{
                System.out.println("Please enter the hour number from 0 to 24");
                getHour();
         return sH;
         static int getMinute(){
            Scanner input = new Scanner(System.in);
            System.out.println("Please enter the minutes: ");
            int setMinute = input.nextInt();
            if(setMinute <= 60){
                System.out.println("You entered " +setMinute+ " for the minutes.");
            }else{
                System.out.println("Please enter the hour number from 0 to 60");
                getMinute();
            return sM;
        private static void showTime(int sH, int sM){
              System.out.println(+sH+":"+sM);
    }

    Hi,pls compare ur coding with the one i have posted below. In your code, the variables sH and sM are still in initialised state(value =0) and its not assigned with the values returned by getHour and getMinute methods. This is why the shoTime method returned zero. Hope i helped you.
    import java.util.Scanner;
    * @author Jaison KS-IT
    public class First {
    static int sH, sM;
    public static void main(String args[])
    getHour();
    getMinute();
    showTime(sH,sM);
    static int getHour(){
    Scanner input = new Scanner(System.in);
    System.out.println("Please enter the hour: ");
    int setHour = input.nextInt();
    if(setHour <= 24){
    System.out.println("You entered " setHour " for the hour.");
    sH = setHour;
    }else{
    System.out.println("Please enter the hour number from 0 to 24");
    getHour();
    return sH;
    static int getMinute(){
    Scanner input = new Scanner(System.in);
    System.out.println("Please enter the minutes: ");
    int setMinute = input.nextInt();
    if(setMinute <= 60){
    System.out.println("You entered " setMinute " for the minutes.");
    sM = setMinute;
    }else{
    System.out.println("Please enter the hour number from 0 to 60");
    getMinute();
    return sM;
    private static void showTime(int sH, int sM){
              System.out.println(+sH+":"+sM);
    }

  • Trouble passing values to subpanels

    I seem to be having issue pass values to my sub VIs in a subpanel.  I'm using the invoke node and control value set command.
    I am able to pass a database reference that I'm using, but when I try Boolean values, I get no response.  I'm also trying to use one of the Boolean values to fire an event.  The front panel of my sub VI looks as though the FP button is being pressed, but my value doesn't change and my event doesn't fire.
    I've reviewed as may forum threads as I could and have looked through the bug reports without any luck.  Any ideas?

    attached is the code snippet.   You can use this as a subVI in place of where you are setting the control value or just hammer the code in directly.  Add error handling as you see fit, although you should note that if you use the error handling within the for loop, you will probably get an error, probably better to move the 'to specific' outside the loop.
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?
    Attachments:
    setCtrlValSignal.vi ‏11 KB

  • Hi, ive been having trouble passing my logic sessions to another computer, we're both using a macbook pro 10.6.8 and logic pro 9 with the same plugins, the session opens in the other computer but all the synths reset to presets

    Hi, ive been having trouble passing my logic sessions to another computer, we're both using a macbook pro 10.6.8 and logic pro 9 with the same plugins (native instruments komplete 7), the session opens in the other computer but all the synths reset to presets, this didnt happen the first time I shared a session, but its been happening lately quite often

    kwmlr439 wrote:
    CSOUND Read the title please:
    Re: Macbook Pro 10.6.8 RAM Upgarde to 8 GB
    The amount of RAM is not dependant on the operating system. It is all about the model of you Mac.
    10.6.8 is the version of OS X that is installed on your system. It has no real baring on the amount of RAM that CAN be installed.
    Personally I have never had good luck with Corsair RAM. I have always had good luck with Crucial and Kingston.
    Message was edited by: Shootist007
    Message was edited by: Shootist007

  • I'm having trouble signing into the iCloud Control Panel.  None of the iCloud suggested fixes work.  I'm using Windows 7 on a PC.  Is there a simple fix out there?

    I'm probably doing this all wrong.  Just in case here it is again.
    I'm having trouble signing into the iCloud Control Panel.  None of the iCloud suggested fixes work.  I'm using Windows 7 on a PC.  Is there a simple fix out there? 

    asdfjava-er wrote:
    The book that I'm using said it wasn't necessary for this because it's supposed to just make sure everything is working properly--which it's not.OK, if you want to ignore my advice, so be it, but please don't complain that it is not going to work without even trying it yourself.
    asdfjava-er wrote:
    Now this is the part I don't get. The book tells me to go to http://localhost:8080/ch1/Serv1 even though there are no files/folders that have the name Serv1.
    Do you understand what the <servlet-mapping> declaration in the web.xml means? It is roughly just saying the appserver that it should port all requests on /Serv1 to the mentioned servlet.
    a couple others like/ch1/WEB-INF/classes/Ch1Servlet.class and /ch1/WEB-INF/web.xml. The WEB-INF folder is not public accessible, so forget about that part.
    "Resource not found" simply means that either the URL is wrong (case counts!) or that the resource is actually not there. I.e. not compiled, not deployed, not loaded, etcetera. Reading the appserver's startup logs might also help.

  • I am having trouble logoin  when i am using muse to upload ftp host and its saying invalid login or

    i am having trouble logoin  when i am using muse to upload ftp host and its saying invalid login or password using different hosting provider?

    Hi!
    I'm having the same problem, and the login and password is 100% correct.
    The FTP is propely configured, but Muse are having problem with it. I can login throught a FTP session from a terminal session, and it also works perfectly with FileZilla or another FTP-client.
    I have made some traces througth Wireshark, and it's clear the Muse made a sucessful login. But, fter the login Muse sends a request for UTF8 and gets an answer from the FTP-server that UTF8 is always enabled, and there is no need to send this command. Then Muse sends a TCP ACK, and the packet after Muse sends FIN, ACK. See a snip from the trace below...
    220-/**********************************************************
    220-*
    220-* This is the FTP server of ############.
    220-*
    220-***********************************************************/
    220-
    220----------------------- Begin Notice ------------------------------
    220--
    220-- Be aware that all traffic are logged and unauthorized
    220-- login attempts will result in permanent banning.
    220--
    220 ------------------------ End Notice ------------------------------
    USER ##########
    331 Password required for ##########
    PASS ########
    230 Logged on
    OPTS UTF8 ON
    202 UTF8 mode is always enabled. No need to send this command.
    Muse -> [ACK]
    Muse -> [FIN][ACK]
    FTP-Server <- [ACK]
    FTP-Server <- [FIN][ACK]
    This means that Muse disconnects AFTER a sucessful login, but give the user a faulty message saying "Invalid login or password" and not that Muse has disconnected because of another reason.
    Looking forward for an answer.
    Best regards
    //Leffe

  • Passing multiple values to a parmeters in SQL Query

    Hi friends,
    I have the following requirement -
    I need to pass multiple values to the parameter 'WHERE hou.name = (:id1)' and the query is copied below for your reference .
    SELECT partno part_num,
         customer customer_name,
         hou.name op_name
         FROM hr_organization_units hou,
         oe_transaction_types_all sot,
         ra_customers rc,
         ra_addresses_all ra,
         ra_site_uses_all rsu,
         oe_order_headers_all h,
         oe_order_lines_all l,pwr_sod50 ps
         WHERE hou.name = (:id1)
    -- and hou.name = (:id4)
    --hou.name in ('CPS FRANCE','CPS GERMANY')
    --and hou.name = (:id1,hou.name)
         and trunc(ps.sch_ship_date) between nvl(:id2,trunc(ps.sch_ship_date)) and nvl(to_date(:id3)+.99999,trunc(ps.sch_ship_date))
         and ps.group_id = 9999999
         and hou.organization_id=h.org_id
         and ps.line_id =l.line_id
         and l.header_id =h.header_id
         and h.invoice_to_org_id=rsu.site_use_id
         and rsu.address_id =ra.address_id
         and ra.customer_id =rc.customer_id
         and h.order_type_id =sot.transaction_type_id
    Looking for your help on this.
    Thanks In Advance.
    Thanks & Regards
    Ramya Nomula

    Hi karthik,
    I am sorry for the wrong updation of my anonymus block.
    My requirement is to pass a multiple values to the parameter in SQL query, and here is the code which is working now for the multiple values with ourt single quotes to the values -
    SELECT partno part_num,
         customer customer_name,
         ps.customer_id customer_id,
         avail_qty avail_qty,
         sch_ship_date schedule_Ship_date,
         so_num order_no,
         h.header_id header_id,
         line_num line_no,
         l.ordered_quantity ordered_quantity,
         scd_qty qty_open,
         s_price unit_price,
         part_flag flag,
         sub_inv subinv,
         sbu,
         hold,
         qoh,
         line_detail_id detail_id,
         picking_line_id,
         picking_line_detail_id,
         rc.customer_name cust_name,
         rc.customer_number customer_number,
         rsu.location location,
         sot.attribute5 order_type,
         ps.line_id line_id,
         h.transactional_curr_code transactional_curr_code,
         hou.name op_name
         FROM hr_organization_units hou,
         oe_transaction_types_all sot,
         ra_customers rc,
         ra_addresses_all ra,
         ra_site_uses_all rsu,
         oe_order_headers_all h,
         oe_order_lines_all l,pwr_sod50 ps
         WHERE ','||:id1||',' like '%,'||hou.name||',%'
         and trunc(ps.sch_ship_date) between nvl(:id2,trunc(ps.sch_ship_date)) and nvl(to_date(:id3)+.99999,trunc(ps.sch_ship_date))
         and ps.group_id = 9999999
         and hou.organization_id=h.org_id
         and ps.line_id =l.line_id
         and l.header_id =h.header_id
         and h.invoice_to_org_id=rsu.site_use_id
         and rsu.address_id =ra.address_id
         and ra.customer_id =rc.customer_id
         and h.order_type_id =sot.transaction_type_id;
    Condition for sending multiple Oprtaing Units -
    WHERE ','||:id1||',' like '%,'||hou.name||',%'
    This above condition is working when i am passing multiple values with out single quotes...but not working for multiple values with single quotes.
    Sample queries tested -
    select 1 from dual where ',aa,bb,cc,' like '%,bb,%' (This is working)
    select 1 from dual where ','aa','bb','cc',' like '%,'bb',%'(This is not working).
    Thanks In Advance!
    Looking for Your Great Help.
    Thanks & Regards
    Ramya Nomula

  • I'm having trouble with my Apple ID. I changed my email account, and recently (a month ago) and since I switched is requested every time I open any app to Apple ID password to the old email. How can I solve this? Could it be that my iPhone 4S is in sync w

    I'm having trouble with my Apple ID. I changed my email account, and recently (a month ago) and since I switched is requested every time I open any app to Apple ID password to the old email. How can I solve this? Could it be that my iPhone 4S is in sync with my Ipod???

    If you updated your existing account then try logging out of it on the iPhone by tapping on the id in Settings > iTunes & App Stores and then log back in and see if that 'refreshes' the account on the iPhone. If you created a new account then any content that you purchased/downloaded via the old account will remain tied to that old account, and only that old account can download updates to its apps.

  • I am having trouble updating iTunes 10.7- it downloads about 70% then stops and says error. What can I do to update??

    I am having trouble updating iTunes 10.7- it downloads about 70% then stops and says error. What can I do to update??

    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/quicktime/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • Hi, I having trouble trying to connect to the wifi, I know the passwords and checked with others divises but with the mac os x 10.7.5  mac os x lino

    Hi, I having trouble trying to connect to the wifi, I know the passwords and checked with others divises but with the mac os x 10.7.5  mac os x lion is not working
    One of the wifi connections said "time out" or did not recongnise the password

    Hi andrea122,
    Thanks for visiting Apple Support Communities.
    If you're not able to connect to Wi-Fi on your iMac, the troubleshooting steps in this article can help:
    Wi-Fi: How to troubleshoot Wi-Fi connectivity
    http://support.apple.com/kb/HT4628
    Regards,
    Jeremy

  • Hi friends, I'm having troubles with my Ipad 2. I was working with it and suddenly the screen distorted. Now it is not possible to get it back to work properly. In fact, the screen is now black and nothing I have done makes the Ipad works again. Thanks

    Hi friends, I'm having troubles with my Ipad 2. I was working with it and suddenly the screen distorted. Now it is not possible to get it back to work properly. In fact, the screen is now black and nothing I have done makes the Ipad works again. Please Help. Thanks in advance.

    I think you should make an Genius Appointment.
    Genius Appointment
    http://www.apple.com/retail/geniusbar/

  • Having trouble with variables followed by a period in user defined reports.

    Using SQL Developer 1.0.0.15 on XP.
    The DB is Oracle 10.
    Having trouble with variables followed by a period in user defined reports.
    select * from &OWNER.TABLE_NAME
    I noticed that the "Data Dictionary Reports" use :OWNER
    So I have tried all sort of variations:
    select * from :OWNER.TABLE_NAME
    select * from :OWNER\.TABLE_NAME
    select * from ":OWNER".TABLE_NAME
    select * from ':OWNER'.TABLE_NAME
    select * from (:OWNER).TABLE_NAME
    And every other variation I can think of. This is a simple example, but all my reports need the owner of tables as a variable.
    I assume this is simple, I just have not hit the right combination.
    Thanks -
    Dyer

    Use two points ..
    select * from &OWNER..TABLE_NAME

  • To dear apple FaceTime users  I'm having troubles logging on to FaceTime I typed in my correct details and its saying check network connection. I did that and every things fine. Any ideas?

    To dear apple FaceTime users
    I'm having troubles logging on to FaceTime I typed in my correct details and its saying check network connection. I did that and every things fine. Any ideas?

    Hello...i'm new to forums....was there ever a solution to this problem please?

  • SQL Query (updateable report) Region - Conditionally Hide and Set Values

    SQL Query (updateable report) Region - Conditionally Hide and Set Values
    Outline of requirement :-
    Master / Detail page with Detail updated on same page using SQL Query (updateable report).
    The detail region has the following source
    SELECT item_id,
           contract_id,
           CASE WHEN hardware_id IS NOT NULL THEN
                   'HA'
                WHEN backup_dev_id IS NOT NULL THEN
                   'BD'
                WHEN hardware_os_id IS NOT NULL THEN
                   'HS'
           END item_type,
           hardware_id,
           backup_dev_id,
           hardware_os_id
    FROM   "#OWNER#".support_items
    WHERE  contract_id = :P26_CONTRACT_IDThe table support_items implements arced relationships and has the following columns
    CREATE TABLE SUPPORT_ITEMS
      ITEM_ID         NUMBER                        NOT NULL,
      CONTRACT_ID     NUMBER                        NOT NULL,
      HARDWARE_ID     NUMBER,
      BACKUP_DEV_ID   NUMBER,
      HARDWARE_OS_ID  NUMBER
    )A check type constaint on support_items ensures that only one of the fk's is present.
          (    hardware_id    IS NOT NULL
           AND backup_dev_id  IS NULL
           AND hardware_os_id IS NULL
    OR    (    hardware_id    IS NULL
           AND backup_dev_id  IS NOT NULL
           AND hardware_os_id IS NULL
    OR    (    hardware_id    IS NULL
           AND backup_dev_id  IS NULL
           AND hardware_os_id IS NOT NULL
          )    Hardware_Id is a FK to Hardware_Assets
    Backup_dev_id is a FK to Backup_Devices
    Hardware_os_id is a FK to Hardware_op_systems
    The Tabular Form Element based on item_type column of SQL query is Displayed As Select List (based on LOV) referencing a named list of values which have the following properties
    Display Value     Return Value
    Hardware Asset    HA
    Backup Device     BD
    Computer System   HSThe Tabular Form Elements for the report attributes for hardware_id, backup_dev_id and hardware_os_id are all Displayed As Select List (Based on LOV).
    What I want to do is only display the Select List for the FK depending on the value of the Select List on Item Type, e.g.
    Item_Type is 'HA' then display Select List for hardware_id, do not display and set to NULL the Select Lists for backup_dev_id and hardware_os_id.
    Item_Type is 'BB' then display Select List for backup_dev_id, do not display and set to NULL the Select Lists for hardware_id and hardware_os_id.
    Item_Type is 'HS' then display Select List for hardware_os_id, do not display and set to NULL the Select Lists backup_dev_id and hardware_id.
    There are properties on elements to conditionally display it but how do we reference the values of the SQL query Updateable region? they are not given a page item name?
    Also on the Tabular For Elements there is an Edit tick against a report item - however when you go to the Column Attributes there is not a property with which you can control the Edit setting.
    What's the best way of implementing this requirement in APEX 3.1?
    Thanks.

    >
    Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "user13515136".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    I have a multi-row region that displays values and allows entries in a number of fields.Provide exact details of how this has been implemented. (An example on apex.oracle.com is always a good way to do this.)
    I should like the fields to be conditional in that they do not permit entry, but still display, if certain conditions apply (e.g. older rows greyed out). Can this be done? Almost anything can be done, often in multiple ways. Which are appropriate may be dependent on a particular implementation, the skills available to implement it, and the effort you're willing to expend on it. Hence it's necessary to provide full details of what you've done so far...

  • Get a insert session value for SQL query at report

    Hi friends
    I created a global temp table and procedure to support web search form.
    and a search result report. The procudure
    gets search result from multip tables and
    insert into temp table --recordsearch. I can get value from temp table  by call procedure
    at SQL*Plus.
    However, I can not get this value by web report.
    How can I get this insert session value and pass to SQL query for report?
    Thanks,
    Newweb
    CREATE GLOBAL TEMPORARY TABLE recordsearch
    (emp_id          VARCHAR2(200),
    ssn               VARCHAR2(9),
    fname          VARCHAR2(200),
    lname           VARCHAR2(200),
    m_name          VARCHAR2(200)
    ) ON COMMIT PRESERVE ROWS;

    it possible that your web form does not have a persistent, dedicated connection. if you have connection pooling for example, multiple sessions will see the same instance of the GTT, so if one deletes it, then nobody sees it (or you can see others data). if the connections are not persistent, then they can disconnect between calls, deleting the GTT table.

Maybe you are looking for

  • Free issue COGS not updating

    Hi, I am having a scenario where i have different pricing procedure which gets triggered in Delivery and through BDC we update the value from that. It working fine for normal sales order but in Free Issue i am getting an error as the other pricing pr

  • Allowing digital signatures in Reader 7.0 (WIN)

    I know I'm missing something simple, but can someone tell me how to get Designer 7.0 (WIN) to allow digital signatures in a form opened in Reader 7.0 (WIN)? I've tried everything I can find, including permissions, but it doesn't work for me. Thanks,

  • Which Apple ID should I use for iCloud?

    I'm thinking of signing up for iCloud. I have 2 Apple IDs. I have an iTunes @Mac.com and Mobile me @me.com. If I use the @me.com will I still be able to synch my iTunes across all of my devices. I would appreciate some advice.

  • Mac is getting to full of photos need to move to external HD

    My Macbook HD is getting full of photos, I need to move to a external HD but how do I get Iphoto work where I can go back and forth between the Macbook and External Iphotos?

  • Firefox can't open any Microsoft link - get "windows stopped working error"

    When I try to open a Microsoft Word or xls file (not Powerpoint), I get the useless Microsoft popup: "Microsoft X has stop working. Windows is looking for a solution....". This just started the other day and I haven't made any changes to my computer.