Passing Shuttle Item results to Database Colomn

Hi There,
Building my first database using APEX and am stuck with how I go about storing the results selected in a Shuttle Item to a database column...
Can anyone please point me in the direction of resolving this issue ?
Regards
Jes

Hmm, I'm not exactly sure how that works ... the process they said to use is:
DECLARE
BEGIN
FOR z in 1..htmldb_application.g_f01.count loop
UPDATE "SHUTTLE_DEMO_CATEGORY" SET "CATEGORY" = 1, "ORDER" = z WHERE "SHUTTLE_DEMO_CATEGORY"."ID" = htmldb_application.g_f01(z);
END LOOP;
FOR z in 1..htmldb_application.g_f02.count loop
UPDATE "SHUTTLE_DEMO_CATEGORY" SET "CATEGORY" = 2, "ORDER" = z WHERE "SHUTTLE_DEMO_CATEGORY"."ID" = htmldb_application.g_f02(z);
END LOOP;
END;
But it's not grabbing anything. At least I want to be able to see the colon delimited items that I selected.
Maybe I am not doing it right ...
All I really want is the "Copy" Functionality from here: http://apex.oracle.com/pls/otn/f?p=35253:2:3896988266043617::NO
If I could use the existing Shuttle Item APEX provides, and somehow mimic the "Copy" portion when clicking the move() > arrow. That would be great. There must be some sort of javascript that I can overload in the header, but I am not sure how to do it.
If anyone has any insight that would be great! I'd appreciate it! I know there's an easier way to do this!!
Thanks in advance!!

Similar Messages

  • How to pass the whole set of values of a shuttle item in AJAX

    Hi,
    I am trying to pass the value of shuttle item to a dynamic process using Ajax. But if I use shuttle_right, I am able to get only the first selected value. If I simply give shuttle it returns null.
    Please let me know How I can get the whole set of values separated by ':'
    Thanks,
    Vikas

    Vikas,
    Here's a little snippet that should get you going:
    var shtVals = '';
    var shuttle = new dhtml_ShuttleObject("PXX_SHUTTLE_LEFT","PXX_SHUTTLE_RIGHT");
    for (x=0; x<shuttle.Op1Init.length; x++) {
       shtVals += shuttle.Op1Init[x].value + ':'; //Op1 = left & Op2 = right
    shtVals = shtVals.replace(/:$/,'');
    alert(shtVals);Regards,
    Dan

  • Need to pass information from MS access database to another prog

    Hi,
    I really need some help here...
    I need to pass selected information from my database to another information.
    I am able to select and display the infotmation but i am not sure how i can transfer the information to the next program. Can any one please offer me some assistance?
    My code is as follow:
    /* Getting data from PSM32 and displaying it *can work* */
    import java.net.URL;
    import java.sql.*;
    import java.lang.String;
    /** Application to create a Ganttchart * */
    public class PSMdb
    public static void main (String argv[])
    //SQLQueryFormat a = new SQLQueryFormat();
    System.out.println("\nEstablishing Connection - Pls Wait... \n");
    /** Get Info fr database**/
    try
         //Connect to the database specified in the URL
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection con = DriverManager.getConnection("jdbc:odbc:PSM32");
         System.out.println("Connection Established.\n");
         //Create a SELECT statement object
         Statement statmt = con.createStatement();
         //Issue the SELECT statement
         String querySt = "SELECT Set, Name, Order " +
         "FROM PMETERS " +
         "WHERE Set = 'BRAKE.BAK' ";
         //Create and execute query
         ResultSet res = statmt.executeQuery(querySt);
           while (res.next())
                String Proj = res.getString(1); //get Proj Name
              String Task = res.getString(2); //get Task Name
              //Print statement
              System.out.println("" +Proj);
              System.out.println("" +Task);
           //Close Statement and Connection
         statmt.close();
         con.close();
         System.out.println("\nConnection Closed - Operation Successful.");
         catch(Exception E)
    //Print out the Exception Error
    System.out.println("Error:" +E );
    }And yes there is another problem. I can compile and run the program in a C:\folder but when i open the document in a project workspace, i cant compile the above code. Can any one please offer me assistance?
    Thanks a million.

    To NanookOITheNorth:
    Could you provide some more relevent information
    about what the other program is and how data should
    be transferred to it? API? Socket? File?was wanted to use the "return task" thing. Issit possible to use that?
    To annie79:
    my next program is supposed to retrive the events in the "task" field and display it in a applet. After retriving the tasks i will be getting the dates to produce the gantt chart. uses the jfree lib functions.
    the code for the applet is as follow
    /* original gantt chart program that can work*/
    import java.applet.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.Calendar;
    import java.util.Date;
    import org.jfree.chart.ChartFactory;
    import org.jfree.chart.ChartPanel;
    import org.jfree.chart.JFreeChart;
    import org.jfree.data.category.IntervalCategoryDataset;
    import org.jfree.data.gantt.Task;
    import org.jfree.data.gantt.TaskSeries;
    import org.jfree.data.gantt.TaskSeriesCollection;
    import org.jfree.data.time.SimpleTimePeriod;
    /** Application to create a Ganttchart * */
    public class Ganttchart extends JApplet{
    /** @param title , frame title **/
        public void init() {
            final IntervalCategoryDataset dataset = createDataset();
            final JFreeChart chart = createChart(dataset);
            // add the chart to a panel...
            final ChartPanel chartPanel = new ChartPanel(chart);
            // this size (500, 270) here doesn't matter cos this become the html control
            // how big u wan can change in the html code the width="800" height="600"
            chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
            setContentPane(chartPanel);
         * Creates a sample dataset for a Ganttchart.
         * @return The dataset.
        public static IntervalCategoryDataset createDataset() {
         //"Task" information should be retrived from the database to replace this current 1
            /*final TaskSeries s1 = new TaskSeries("Scheduled");
            s1.add(new Task("Write Proposal",
                   new SimpleTimePeriod(date(1, Calendar.APRIL, 2001),
                                        date(5, Calendar.APRIL, 2001))));
            s1.add(new Task("Obtain Approval",
                   new SimpleTimePeriod(date(9, Calendar.APRIL, 2001),
                                        date(9, Calendar.APRIL, 2001))));
            s1.add(new Task("Requirements Analysis",
                   new SimpleTimePeriod(date(10, Calendar.APRIL, 2001),
                                        date(5, Calendar.MAY, 2001))));
            final TaskSeries s2 = new TaskSeries("Actual");
            s2.add(new Task("Write Proposal",
                   new SimpleTimePeriod(date(1, Calendar.APRIL, 2001),
                                        date(5, Calendar.APRIL, 2001))));
            s2.add(new Task("Obtain Approval",
                   new SimpleTimePeriod(date(9, Calendar.APRIL, 2001),
                                        date(9, Calendar.APRIL, 2001))));
            s2.add(new Task("Requirements Analysis",
                   new SimpleTimePeriod(date(10, Calendar.APRIL, 2001),
                                        date(15, Calendar.MAY, 2001))));*/
            final TaskSeriesCollection collection = new TaskSeriesCollection();
            collection.add(s1);
            collection.add(s2);
            return collection;
         * Utility method for creating <code>Date</code> objects.
         * @param day  the date.
         * @param month  the month.
         * @param year  the year.
         * @return a date.
        private static Date date(final int day, final int month, final int year) {
            final Calendar calendar = Calendar.getInstance();
            calendar.set(year, month, day);
            final Date result = calendar.getTime();
            return result;
         * Creates a chart.
         * @param dataset  the dataset.
         * @return The chart.
        private JFreeChart createChart(final IntervalCategoryDataset dataset) {
            final JFreeChart chart = ChartFactory.createGanttChart(
                "Ganttchart",  // chart title
                "Task",              // domain axis label
                "Date",              // range axis label
                dataset,             // data
                true,                // include legend
                true,                // tooltips
                false                // urls
    //        chart.getCategoryPlot().getDomainAxis().setMaxCategoryLabelWidthRatio(10.0f);
            return chart;   
    }As for the "run the program in a C:\folder but when i open the
    document in a project workspace, i cant compile the
    above code. Can any one please offer me assistance?"The run time error that i get is "java.lang.NoSuchMethodError: main
    Exception in thread "main" "
    Please give me some leads on how i can cont to proceed?
    Thanks a lot

  • Shuttle Item in 3.1

    I noticed that since the last update I have problems with the shuttle item receiving an error
    Bad Request
    Your browser sent a request that this server could not understand.
    mod_plsql: /pls/otn/wwv_flow.accept HTTP-400 Too many arguments passed in. Got 4175 parameters. Upper limit is 2000
    Oracle-Application-Server-10g/10.1.3.0.0 Oracle-HTTP-Server Server at htmldb.oracle.com Port 80
    See this example and try to click the button "Save"
    http://htmldb.oracle.com/pls/otn/f?p=31517:166
    This example was set up under version 3.0.1 and every click was collecting the values
    shown in the table on the right side. However, since the last update this doesn't work
    any more. Is there really a limit of 2000 records per select list?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

    Hi Carl,
    >> … it probably won't happen till next full version, since it does effect js css as well as the HTML source
    Yes, I figured as much, and next version will be fine. Thanks.
    >> Confusing is bad enough but is there an actual functional difference?
    As far as the IDs for the select list goes, If you are aware of the issue, it’s only confusing, but it will work without any changes. With the IMGs it’s a bit more complicated, and can impair functionality. In RTL mode, the ‘Move’ icon is actually pointing from the destination to the source. In the same manner, the ‘Remove’ icon is pointing from source to destination. The user, relaying on the arrow direction, can press the Remove icon, in order to select an option, and will not understand why nothing happen (or, if one of the selected options was highlighted, it will be removed). This can be worst for the user if you didn’t translate the img ‘title’ to a native language. The same effect, of course, is with the ‘Remove’ icon.
    You can check the behavior of a regular shuttle item in a RTL page in here - http://htmldb.oracle.com/pls/otn/f?p=22710:260 .
    >> just shows that listening to Scott is usually the best course of action
    I learned that a long time ago, so no argument here :-)
    Regards,
    Arie.

  • Shuttle Item  Problem

    Hello Everyone,
    In my database desing, i have two table : customer and order.
    CREATE TABLE CUSTOMER (
    id NUMBER PRIMARY KEY,
    customer_name VARCHAR2(50));
    INSERT INTO CUSTOMER VALUES (1, 'Micheal');
    INSERT INTO CUSTOMER VALUES (2, 'Jack');
    INSERT INTO CUSTOMER VALUES (3, 'Mary');
    INSERT INTO CUSTOMER VALUES (4, 'Marty');
    INSERT INTO CUSTOMER VALUES (5, 'Alice');
    CREATE TABLE ORDER (
    id NUMBER PRIMARY KEY,
    order_name VARCHAR2(50)
    order_price NUMBER);
    INSERT INTO ORDER(1,'MP3player', 50);
    INSERT INTO ORDER(2,'USB', 10);
    INSERT INTO ORDER(3,'laptop', 1000);
    INSERT INTO ORDER(4,'Phone',500);
    INSERT INTO ORDER(5,'Modem', 100);
    INSERT INTO ORDER(6,'LCD', 1500);
    INSERT INTO ORDER(7,'Mouse', 20);
    There is m to m relationship among these tables.
    CREATE TABLE CUS_ORD_ITEMS(
    id NUMBER PRIMARY KEY,
    order_id NUMBER NOT NULL,
    customer_id NUMBER NOT NULL
    I want to create shuttle item for this relationship. Shuttle item source are orders. In intreactive report, when i select a customer, customer's orders will be opened. And I wanna add and remove orders for this customer in shuttle item. But there are some problem when customer is deleted and order deleted, and order source. How can i solve this problem.
    Any suggestion?
    Thanks.

    Hi,
    When the page is loaded, the items shown in the list on the right are the values that exist on CUS_ORD_ITEMS for the customer. When you submit the page by clicking a button, these values are shown as "1:2:3:4:5" (where 1, 2, 3, 4 and 5 are the keys - usually the primary keys but can be any other unique key - for the items that have been selected). As you move an item from the right to the left its key is removed from this list - so if I removed item "2", the list would now be "1:3:4:5".
    So, what you need to do, is delete any record on CUS_ORD_ITEMS for the customer that is no longer in that list:
    DELETE FROM CUS_ORD_ITEMS
    WHERE CUSTOMER_ID = :P1_CUSTOMER_ID
    AND ':' || :P1_ORD_ITEMS || ':' NOT LIKE '%:' || ORDER_ID || ':%'- replace P1_CUSTOMER_ID with the page item name that holds the customer ID value and replace P1_ORD_ITEMS with the page item name for your shuttle.
    For any ORDER_ID value that is no longer in the list, the NOT LIKE condition would be true and the record would be deleted. For all other items, the condition would be false and the record would not be deleted.
    Andy

  • Shuttle item and optimistic lock

    Hi everyone,
    I need to use a shuttle item to insert/update some data in a table. Because of that, I need to have a pl/sql process that will have the insert or update commands, so no DML allowed in my app page. By doing this, I lose the optimistic lock implemented within the DML process, so I've been searching and reading on how to accomplish this manually.
    I followed this post (Re: Optimistic locking on manual non-tabular form among others but it doesn't work properly.
    Is there another way to get the optimistic lock manually?
    Or better yet, is there a way to update a table from a shuttle item with DML?
    btw, i'm using apex 4.1.
    Thanks!
    Elena.

    Hello Elena,
    >> tab := apex_util.string_to_table (:p1_multiple_item);
    Yes. This is what I meant in parsing the shuttle value.
    >> Maybe I'm wrong, but this implies no use of DML, doesn't it?
    You are not wrong, although the correct term would be Automatic DML, which is a built-in APEX process (The term DML refers to any insert/update/delete database operation, regardless of APEX).
    You didn’t specify if you are familiar with the Optimistic Locking algorithm (which, BTW, pertains only to update data). In any case, my suggestion to you is to use the SQL Workshop to generate a package on your relevant table, and examine the update procedure that was generated. This procedure implements the Optimistic Locking algorithm and can be a great starting point for you to adapt it to your specific needs.
    You can generate the package using SQL Workshop ==> Object Browser ==> Create ==> Package ==> Package with methods on database table(s) .
    Hope it helps,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

  • Shuttle Item problem in Apex 3.1.2

    Hi
    I created application based on shuttle items in apex earlier version.
    The same is not working fine in Apex 3.1.2 version.
    I'm not doing any process on shuttle items.
    Just created a shuttle item contains a list of values.
    whenever i refresh the page,(or say when i press Cancel button to go back to previous page)
    shuttle item selects all the values in the list, (i.e values in shuttle items are rolling).
    I somehow tried to replicate the same application in demo environment :
    http://apex.oracle.com/pls/otn/f?p=12822:4
    workspace: vsanthanam
    userid: vijay
    password: apex_demo
    If you see above application, whenever we press button submit. it selects all the values in
    Shuttle (actually rolling in my developement instance and not processing further).
    Is there anything that we have to take care while using shuttle in newer version?
    Thanks
    Vijay
    Edited by: Vijay Santhanam on Jan 26, 2009 9:39 PM

    Hi Arie
    Thanks for your valuable inputs.
    While analyzing the issue on two versions: 3.1.2 & 3.0.x ,I noticed few things:
    1) Limitation of 2000 values
    Had raised SR with Oracle, They have treated this as bug some time back and have temporary resolution as per BUG ID 7326899.
    This got temporarily resolved by setting higher value for PlsqlMaxParameters.
    As per my understanding: Shuttles never used to refer to this variable value In earlier version. We are on earlier version on one of the instance, where the value for this parameter is still 2000, and despite having more number of values in shuttles on page it never throws error. That shows its a change in new version and behavior is not same.
    2) Looping/ Going through all values in left box and then right box of shuttle when page submits.
    I am pretty sure at-least about the visual part that it never happened in earlier version what I see on my application on earlier version. But I am not sure about the page rendering / functionality part as this would need regression testing.
    So this is second change in shuttle behavior.
    Since Business users need all values to be present in the shuttle even after submit for resubmission i.e. again creating the records, so I have not put yet the java script suggested by you to put restriction on length so that it doesn’t loops through values.
    I went though the thread where Carl and You have discussed the issue:
    Shuttle Item in 3.1
    Thanks again Arie!
    I am also following with Oracle to get some solution other than following you :-)
    Regards
    Ravijeet

  • I need to pass data from an Access database to Teststand by using the built in Data step types(open data

    base /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1i need to pass data from an Access database to Teststand by using the built in Data step types(open database /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1
    When I tried the same thing on another cmputer the same thing
    happend
    appreiciate u"r help

    base /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1Hello Kitty -
    Certainly it is unusual that you can still see the tables available in your MS Access database but cannot see the columns? I am assuming you are configuring an Open Statement step and are trying to use the ring-control to select columns from your table?
    Can you tell me more about the changes you made to your file when you 'changed' it with MS Access? What version of Access are you using? What happens if you try and manually type in an 'Open Statement Dialog's SQL string such as...
    "SELECT UUT_RESULT.TEST_SOCKET_INDEX, UUT_RESULT.UUT_STATUS, UUT_RESULT.START_DATE_TIME FROM UUT_RESULT"
    Is it able to find the columns even if it can't display them? I am worried that maybe you are using a version of MS Access that is too new for the version of TestSt
    and you are running. Has anything else changed aside from the file you are editing?
    Regards,
    -Elaine R.
    National Instruments
    http://www.ni.com/ask

  • Shuttle Item Properties in Apex 3.0

    Hi,
    Hoping someone can assist with the new Shuttle item in Apex 3.0.
    Basically, can someone please let me know how I can perform the following:
    a) change the width of the shuttle as when I make a change to the width property, it doesn't seem to make any difference?
    b) Am I still able to place headings on each of the shuttle cells like I could when using Carl's example?
    c) Based on Carl's original Shuttle implementation, is there any undocumented information relating to the new Shuttle item?
    Thanks.
    Tony.

    Hi Tony,
    <p>
    a) under Elements>HTML Form Element Attributes, use style="width:200px" to set the width for the item<p>
    b) I have not found a way to do that, although others may have<p>
    c) Check out the Apex 3.0 documentation for the shuttle item--you basically treat it like a multi-select list, with the source of the item returning a colon-delimited string of values.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to keep sort order in Shuttle item's source and destination boxes?

    I have defined a shuttle item on a page and the list of values in the source box is populated by a SQL with sort order specified. In the Settings of the shuttle item, Show Controls value is set to Moving Only instead of All. When a user moves selected values from the source box to the destination box or vice versa, the list of values does not maintain the original sort order. For example, if I have 26 values A through Z, a user can put value Z before A in the destination box. And when a user move A from the destination box to the source box, A is the last item in the source box. The reset button clears everything in the destination box and resets the source box to the original sorted list. This is not the solution that I am looking for. I would like to see the items in the source and destination boxes to maintain their original sort order all the time.
    Is it possible?
    APEX v4.0.1.00.03
    Oracle 11g (v11.2.0.1.0)

    Hi,
    See if this post help
    Re: Sort Shuttle Right
    Regards,
    Jari

  • Searching a Table field with multiple values using a shuttle item

    Hello All,
    I have a shuttle item whhich of course users can select multiple values:
    eg: Orange:Pear:Banana
    Now I have a table where I want to get the Crate Numbers where these fruit items reside.
    The Fruit field has multiple stored values
    eg:
    Crate Fruits
    === ====
    12487 Apple:Orange:Pear:Banana
    17653 Orange:Pear:Grapes
    12874 Apple:Banana
    13655 Grapes:Watermelon:Pineapple
    87643 Pear:Banana
    53626 Strawberries:Apple
    I would like to see a final report similiar to this
    Crate Fruit
    === ===
    12487 Orange
    12487 Pear
    12487 Banana
    17653 Orange
    17653 Pear
    12874 Banana
    87643 Pear
    87643 Banana
    I thought maybe this needs to be done using collections but I am not familiar with this function, if their is another way I would appreciate it
    Hope u can help
    Frank

    Hi Frank,
    I find that in this sort of case, it is easier to create a link table containing the individual values rather than lumping them into one column.
    so the data is stored in the 'Crate, Fruit' format, rather then the 'Crate Fruits' format.
    It is a bit more work maintaining the link table when the values are amended and populating the shuttle, but it is a 'proper' relational table then.
    Regards
    Michael

  • Set Session State with Shuttle items

    Is it possible to have session state set with each item selected in a shuttle? You have a shuttle with 4 possible options, you select item 2 from the left portion of shuttle and it is moved to the right.. Can you set the session state at that point?
    What I am trying to do is take the session state after change in the control and use it to populate a text field below. The returned values are used in a sql select to populate the text box with a looked up value...
    Thank you,
    Tony Miller
    Ruckersville, VA

    TexasApexDeveloper wrote:
    Won't this just push the last items value in, as apposed to appending the value?
    Tony,
    No. Because for shuttle items the return value is stored as colon delimited string.
    Means after each change you will have a colon delimited string in the session state with selected values(moved to right).
    See this http://apex.oracle.com/pls/apex/f?p=46417:47

  • Count Selected Shuttle Items

    Apex 3.2
    I have a shuttle item and a text box.
    As the user moves items from the left of the shuttle to the right, I would like to display a count (in the text box) of the number
    of items he has chosen.
    I know that his will probably have to be done with an onclick javascript function, but I have no idea how to do it.
    I cannot use dynamic actions, as this is an Apex 3.2 application.
    Please have a look at my workspace
    Workspace: GUSCRIGHTON
    Username: [email protected]
    Password: terminator
    App Id: 25851
    Page: 5
    Thanks
    Gus

    I was kind of hoping to capture the change event on the shuttle fieldset, but can't, for some reason. I'm too rusty in my js-fu. If that'd even work in 3.2, no clue.
    Binding to the controls like Jari suggested works though.
    function setShuttleSelectedAmount(pShuttleId, pAmount){
      var lAmount = document.getElementById(pShuttleId+"_RIGHT").children.length;
      document.getElementById("P5_DESCRIPTION").value = lAmount;
    function attachShuttleEvents(pShuttleId){
      document.getElementById(pShuttleId+"_RESET").addEventListener("click", function(){
        setShuttleSelectedAmount(pShuttleId);
      }, false);
      document.getElementById(pShuttleId+"_MOVE").addEventListener("click", function(){
        setShuttleSelectedAmount(pShuttleId);
      }, false);
      document.getElementById(pShuttleId+"_MOVE_ALL").addEventListener("click", function(){
        setShuttleSelectedAmount(pShuttleId);
      }, false);
      document.getElementById(pShuttleId+"_REMOVE").addEventListener("click", function(){
        setShuttleSelectedAmount(pShuttleId);
      }, false);
      document.getElementById(pShuttleId+"_REMOVE_ALL").addEventListener("click", function(){
        setShuttleSelectedAmount(pShuttleId);
      }, false);
      document.getElementById(pShuttleId+"_LEFT").addEventListener("dblclick", function(){
        setShuttleSelectedAmount(pShuttleId);
      }, false);
      document.getElementById(pShuttleId+"_RIGHT").addEventListener("dblclick", function(){
        setShuttleSelectedAmount(pShuttleId);
      }, false);
    attachShuttleEvents("P5_SHUTTLE");
    PS: I also want to mention that this may be browser dependant, especially for IE<9 where you would need to use attachEvent instead of addEventListener...
    Edit: maybe Paul knows more!

  • How can I pass/add these results in my Main query's column

    Hello Experts
    I’m working on a subquery. My subquery works fine and give the results what I need. But how can I pass/add these results in my Main query’s column ‘MGRNAME’. Here is my query
    select pc.c_id "Project ID",
    cn.c_id "Client ID", cn.c_last "Last Name", cn.c_first "First Name",
    pj.mgr_id "Manager ID", pj.project_name "Project", MGRNAME
    from project_consultant pc
    join consultant cn
    on (pc.c_id = cn.c_id)
    join project pj
    on (pc.p_id = pj.p_id)
    where lower(cn.c_last) = 'myers'
    and MGRNAME in
    ( select concat (substr(c_last,1,20),
    substr(c_first,1,20))
    as MGRNAME from consultant
    where c_id in (102, 103)
    When I run the above query I got error.
    Thanks a lot on advance

    I’ve join three tables to get the information about I need. I got everything working expert one part. The subquery
    ( select concat (substr(c_last,1,20),
    substr(c_first,1,20))
    as MGRNAME from consultant
    where c_id in (102, 103)
    Gives me the names of employees I need. The output comes 2 names. I’m trying to add these 2 names in my main query and show the results but I got the following error
    Error at Command Line:11 Column:4
    Error report:
    SQL Error: ORA-00904: "MGRNAME": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    I can understand there is something wrong with MGRNAME field but not sure what it is. Can somebody point it out?
    Once again this is main query with single sub query
    select pc.c_id "Project ID",
    cn.c_id "Client ID", cn.c_last "Last Name", cn.c_first "First Name",
    pj.mgr_id "Manager ID", pj.project_name "Project",
    MGRNAME
    from project_consultant pc
    join consultant cn
    on (pc.c_id = cn.c_id)
    join project pj
    on (pc.p_id = pj.p_id)
    where lower(cn.c_last) = 'myers'
    and MGRNAME in
    ( select concat (substr(c_last,1,20),
    substr(c_first,1,20))
    as MGRNAME from consultant
    where c_id in (102, 103)
    Hope it helps

  • How to validate a shuttle item in oracle apex

    Hello,
    I am having a shuttle item in the page . I want to validate the shuttle . am using oracle apex 3.2.1 on oracle 11g.
    I want to raise an alert if the user not selected value from shuttle else display the selected value in alert .
    please help me in resolving this issue.
    thanks
    Edited by: kumar73 on Apr 17, 2010 2:15 PM

    Hi,
    This might help
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/bldr_pgs.htm#sthref565
    Create item level validation Item Not Null
    Br,Jari

Maybe you are looking for

  • Xsl:text

    xsl:text elements always are shown as errors in xslt. It appears that the dtd being used by JDeveloper is wrong. Can someone at Oracle respond to this and tell me either where a good dtd is, and how to get jdeveloper to recognize it, or when a patch

  • Collections.sort() - sort on multiple fields?

    I have a collection of objects in a List that I need to be able to sort on each field individually. For example, the data in the List is eventually displayed on a table in a web page. The user is able to click on a column header and the table is to b

  • Autoquery of form

    Hi, I have a form with one field with LOV. My problem is that I want it to show values without pressing the query button. Is it possible? Thanks, Brano

  • Media can't be used because you don't have access privileges

    Why is it that I cannot drag across an image from iphotos which I have previously photo streamed across from my iphone 5?  I keep getting the following message "The media can't be used because you don't have access privileges, or because it has no co

  • Unapplying Audio FX effect

    Is it possible to undo an Audio FX effect on single audio clips? I know I can click the undo button, but suppose I want to come back later and undo the effect after I've clicked saved numerous times? "Revert to original" doesn't appear to apply to au