Display and return value in select list.

hi,
i want to display the value in select list coming from this quary .
select student_id from class_record where class_id =:p1_class_id and SECTION =:p1_section
minus
select student_id from STUDENT_TYPE_DETAILS where class_id =:p1_class_id and SECTION =:p1_section;
but i want f_name and last name with student_id .f_name and l_name store in table s_per_det.student is also in that table.
how can i define display value and return value in this quary using 3rd table s_per_det.
How can i do this.
Thanks
manoj

Ooh, MINUS.... Can you not use a NOT EXISTS in this case, could have a big effect on the execution plan?
Something like this perhaps?
SELECT f_name||' '||l_name,
       stundent_id
FROM class_record a,
     s_per_det b
WHERE a.student_id = b.student_id
AND   a.class_id   = :P1_CLASS_ID
AND   a.section    = :P1_SECTION
AND   NOT EXISTS(SELECT 'X'
                 FROM student_type_details c
                 WHERE a.student_id = c.student_id
                 AND   c.class_id = :P1_CLASS_ID
                 AND   c.section = :P1_SECTION)Cheers
Ben
http://www.munkyben.wordpress.com
Don't forget to mark replies helpful or correct ;)

Similar Messages

  • Popup LOV with same display and return values

    Hi
    I have created a List of Value using the following query.
    SELECT partner_name display, partner_name return
    FROM partner_table
    WHERE partner_name is not null
    order by 1
    The above query returns around 3000 rows of data. This has been linked to Item as Popup Key LOV(Displays description, returns key value). When the popup is selected the values are not displayed, only "Row(s) 1 - 10" and pagination buttons are displayed.
    Could anyone please suggest me with a solution.
    Thanks in advance.

    Change the Next button label to remove the > character. This sounds like a familiar problem.
    Scott

  • Possible bug ? - Default value for select list

    4.2.1
    Hi, I have one page with a couple of reports. I have a time period filter on top. Its a select list with values 7 days, 3 months and 12 months. Default value is set to 3 (where return values of select list is 1,2,3 resp).
    Now in page 1 which has this select list, :P1_SELECT it has a report which shows counts of number of items purchased. When the user clicks on the count(hyperlinked column), it takes the user to another page which runs the details of the items and also uses the Page 1 select. It works fine when I change the time period. However, if I dont change the time period in the select list when I first login, althought I have set the default value to 3, the interactive report on page shows no data found, because the select list default value I guess it does not recognize.
    Is this a bug?
    Thanks,
    Sunil

    ryansun wrote:
    4.2.1
    Hi, I have one page with a couple of reports. I have a time period filter on top. Its a select list with values 7 days, 3 months and 12 months. Default value is set to 3 (where return values of select list is 1,2,3 resp).
    Now in page 1 which has this select list, :P1_SELECT it has a report which shows counts of number of items purchased. When the user clicks on the count(hyperlinked column), it takes the user to another page which runs the details of the items and also uses the Page 1 select. It works fine when I change the time period. However, if I dont change the time period in the select list when I first login, althought I have set the default value to 3, the interactive report on page shows no data found, because the select list default value I guess it does not recognize.
    Is this a bug?NO.
    Default values is only populated on the clien side and NOT in the session.
    This has been discussed thousands of times in the forum..found this with a simple search {message:id=4440597}

  • Urgent! Display lookup value and return value at the same time.

    We are using pop up lov.
    How can we display lookup value and return value at the same time. let me claer..
    Our lov query is like fallowing
    select dname, deptno from dept
    we want to return deptno column into a database bind text item and dname column into a display item (look up)
    can we do it (we need to do)
    thanks for your help.

    We did it .
    But pop up key lov (display description return value ) property doesn't appear for tabular forms item.
    (Report Attributes pages Tabular Form Element section display As property list)
    can we set or not.
    Thank you.

  • Displaying region based on multiple selection list

    Hi,
    this is my scenario.
    i had 3 drop down selection lists A, B, C. based on A and/or B, C is populated. and when i select one from C, i display a report regions.
    i am able to achieve this, and when in the selection list C, I have a null value as "- All -"
    so when i select "- All -" then the report region should not show anything.
    so in my report region query this is what i gave
    DECLARE
    q varchar2(2000); --query
    w varchar2(2000); --where clause
    we varchar2(1) := 'N'; --where condition
    BEGIN
    q := 'SELECT * from SCCATCH';
    IF :P1_STATION != 'NULL' THEN
    w := 'COLLECTION = :P1_STATION';
    we := 'Y';
    END IF;
    IF we = 'Y' THEN
    q := q ||' WHERE '|| w ;
    END IF;
    RETURN q;
    END;
    where :P1_STATION is the item value of C.
    now what is not working is when i select A, B then C is populated and whne i select C, the report region is displayed.
    now when i go back and select A, B , then C is again populated with a different C list, but the report region still remains the same showing the previous result.
    what i really want to do is. when i select list A,B and then C, report get displayed. and when i go back and change sleection in A,B and then obviously C gets changed, then the report region should not show anything untill i select one from C.
    i understand that there is some basic things i need to do to fix this, but i am not able to fix this.
    Can you help me please.
    Thanks,
    Philip.

    user12943263 wrote:
    HiPlease update your forum profile with a real handle instead of "user12943263".
    I basically want to use the select below for my list but I do not know how to get the app and session no.
    select list_desc, 'f?p='||get_app_id|| ':' || page_no||':' || get_session_id
    from table_nameIn SQL use bind variable notation as described in the Understanding Substitution Strings section of the documentation:
    select
      ,  'f?p=' || :app_id || ':' || page_no || ':' || :app_session
    from
        ... Always consult the documentation before posting here.
    Dynamic Actions, JavaScript, and all "P.Ranish" posts above are all irrelevant to your question.

  • How to display chart region based on select list in html region ?

    Hi all,
    i'm using 4.0.1.00.03 apex version,in a page i have 2 regions one is html and another one is Chart region.in html region i have a select list and button.when user sign into my application select list have some values in that page,user select's a value and clicks on the button then chart will be displayed.my query is when user first sign into my application i want to dispaly chart region when only select list is selected and clicks on the button.can any one guide me on this.
    thnx in Adv.

    Hi yann,
    thnx for ur reply,
    i have done what u have written but i didn't meet my requirement..
    let me explain what i need exactly
    as of now my application is like this..
    i have a html region in that i have select list(P6_LIST) and go button
    and chart region.
    chart query is like this..
    SELECT your_value
    FROM your_table
    WHERE your_value = :P6_LIST
    AND ...
    how it is working??
    when user sign into my application, user can see html region with 'select list and go button' and chart region with 'no data '.
    when user select a value in select list and click on go button automatically chart region will be dispalyed with chart.
    what i wanted to change is..
    when user sign into my application, user can see html region with 'select list and go button' and no chart region
    when user select a value in select list and click on go button then only user can see chart region with chart.
    plz help me how to do it.. :)
    thnx in Adv.
    Edited by: moulani on Nov 4, 2011 12:05 PM

  • How to get the value from select list to text box

    Hi,
    I have a select list i want to retrieve the value from select list to text box.
    How can i do that???
    Regards,
    Sakthi.

    Hi Sakthi,
    Yo can use the Java script for that..
    Dynamically the value will come into text box.
    Use the below script.
    <script type="text/javascript">
    function disFormItems()
    var lReturn = $v(here your select list name)
    alert(lReturn);
    document.getElementById(here your text box name).value =lReturn; }
    </script>Cheers,
    Shan

  • Exporting and returning value question

    What is different between exporting and returning value in method of a class. if created an object inside the method and exporting it, it means I have a reference to that object inside program. If I use returning value, it means I have a copy of object created inside the method, but the object inside method is destroyed after it ends. Do I understand correctly? if so what do u prefer exporting or returning value? thanks!

    Hello Anthony
    The major difference is that you can have multiple EXPORTING parameters yet only a single RETURNING parameter. In addition, if you have a RETURNING parameter you cannot have EXPORTING parameters simultaneously.
    Defining methods with a single RETURNING parameter is more Java-like than having multiple EXPORTING parameters.
    Whenever possible and sensible I prefer RETURNING parameters over EXPORTING parameters because they allow to use the function method call, e.g.:
    go_msglist = cf_reca_messagelist_create( ).
    Regards
      Uwe

  • Change display value of "select list"

    Hi!
    I have a problem with a select list, I want to change the display value through an own pop up (page 5 of apex application) after I submit in it.
    The select list is based on a sql query:
    select A_NAME display_value, A_ID return_value
    from APPLICATIONS
    where a_application_type='GROUP'
    order by 1
    beside I have an link to open a pop up window:
    ... onClick="window.open ('f?p=&APP_ID.:5:&SESSION.::::', 'newWin',
    'scrollbars=no,status=no,width=500,height=270' ...
    On the pop up site there is a tree and a submit button which close the window and renew the original page:
    javascript:window.opener.location.reload();window.close();
    Through the tree I get the value (Group-ID) which I need.
    When I'm back on page 4 a "before header" renew page process links again on the side 4 and change the value of my select list. Afterwards the values have changed correctly but the display value is still the old one. It only change when i go on an other page of the apex application and come back.
    I don't know why it doesn't change immediately!?
    Thanks ahead

    I have done with a solution just in a nutshell of what u r looking for:
    1.create HTML region.
    Add two items : Select list with redirect(P6_X) and text field(P7_X)
    2. Select list is based on LOV query as :
    select empno d,empno r from emp ;
    Source value is Empno Type:DBcolumn.
    3.The text field Source type : SQL Query .
    Query : select ename from emp where empno = :P6_X
    Now select from the dropdown empno and it will populate the Ename value accordingly based on the query .
    U can have more than one text fields and populate those in the same way.....
    Cheers,
    ROSY

  • Can I have a LOV for display and a LOV for select values in a form ?

    My LOV are in table :
    lov_return, lov_display, lov_available
    To avoid a loss in translating lov_return in lov_display values, I manage a flag, lov_available, Y/N to filter out obsoleted values.
    By example, at the beginning of using the application, I have :
    LOV_RETURN
    LOV_DISPLAY
    LOV_AVAILABLE
    1
    TOP
    Y
    2
    CENTER
    Y
    3
    BOTTOM
    Y
    And I have records with 1, 2 or 3 in the field corresponding with the LOV.
    So far, so good.
    Then I want to have a slightly different set of values in my LOV, for new records :
    LOV_RETURN
    LOV_DISPLAY
    LOV_AVAILABLE
    1
    TOP
    Y
    2
    CENTER
    N
    3
    BOTTOM
    Y
    4
    CENTER-TOP
    Y
    5
    CENTER-BOTTOM
    Y
    So, when I edit an old record in my form, I want the 2 to be well deciphered into CENTER, and in the SELECT list, I want TOP,BOTTON,CENTER-TOP,CENTER-BOTTOM.
    When I assign the dynamic LOV : select lov_display d,lov_return r from lov_table where lov_available = 'Y', to the corresponding field in my FORM, even allowing extra values will not help and will display '2' instead of 'CENTER'.
    Is there a way I can manage to show the translated 'CENTER' in the field, and offer a list of values taking in account the 'availability' of the value, other than including the PX_FIELD test in my SQL for the dynamic LOV ?

    A common logical problem I encountered back the days of Oracle Forms.
    A solution I often see is displaying invalid options with an asterisk, and applying validation to ensure users don't change to invalid selection.
    No doubt there are some clever ways to tart this up with jQuery, also.
    Scott

  • SQL SELECT and Return values

    I have a simple SELECT statement in a Stored Proc that
    queries 2 tables in
    SQL Server 2000 using a join. My problem is I want to return
    values based on
    the outcome of the query eg. if a row is returned then return
    1, or return 2
    if no rows are found. I have tried various ways to implement
    this and they
    always work fine in Query Analyser but in Dreamweaver MX2004
    either return
    no return values ( or at least they are not displayed on my
    page ) or the
    return values are inconsistent. I am using a DW Command.
    I know this is DW and not my code as Query Analyser produces
    the correct
    values every time. Can anyone tell me what code I can use
    that is DW
    friendly please.
    Thanks.

    I read your note with a great degree of sympathy but no
    solutions. I was having the same trouble with access tables after 4
    years of trouble free connections. It may not be relevant but the
    solutions for my problem was a Server software SP release. Details
    are:
    Following the avalanche of hints and tips I am pleased to
    report that there is a problem with Dreamweaver MX and MX2004 when
    connecting to Access databases running on Windows Server 2003 SP1.
    Whilst it is covered in the knowledge base I note that others in
    the forum are having similar difficulties with Sequel connections
    and unable to retrieve failures.
    There is a "fix" - SP2DBFix1.0.2.mxp - for my problem and I
    cannot be alone in experiencing this.
    And just in case anyone from Adobe is reading this, you
    should have written to all your registered and paid up members
    informing us of this problem when WS2003 SP1 was released!
    Hope this helps.

  • How to display a value from Select List by default

    I have a Select List on a form and I need to on page load show an entry from the SL depending on the user Id of the user logged on.  For example, if the SL had 3 entries: 'Div1', 'Div2', and 'Div3', depending on the division the user belongs to (I can determine that from his user Id using a SQL), say, I need to display 'Div2' to the user in the SL instead of the usual NULL or '---- Select Div ----'.  'Div1' and 'Div 3' entries will still be part of the SL, but for user's convenience I need to display their division.
    Any ideas?
    Thanks,

    Hi Ajay,
    you need to specify your apex version, database version and so on to make our help specific.
    Anyhow you can create a page process- for example one at On Load before header.
    For example;
    [code]
    declare
      v_division varchar2(32);
    begin
      --select default division
       select my_division
       into v_division
      from my_division
      where my_division=:APP_USER;
    :P_DIVISION:=v_division;
    end;
    [/code]
    Then in the default of your select list, specify P_DIVISION as the default. Using one of several methods
    Understanding Page-Level Items
    Kofi

  • Browsing Apps on App Store and selecting 1 and returning starts the App list at 1.  Is there a workaround for this?

    It seems that everytime Apple releases an update to IOS, the App Store behaves differently!  My iPad 1 is currently at 4.3.3 and nearly everytime I select an app in the app store to read about, when I return, I'm back at #1.  This has become an issue since I'm trying to browse through all of the apps in certain categories for a pilot project we're doing at my middle school.
    Thanks for your help,
    Mikeca55
    iMac2011, iPad, iPod Touch, Windows XP

    A number of people have reported the same 'feature' of the store. Apart from leaving feedback for Apple I'm not sure that there is much that you can do : http://www.apple.com/feedback/ipad.html
    You could try looking at them on a browser : http://itunes.apple.com/us/genre/mobile-software-applications/id36?mt=8

  • Display all records from 4 select list

    Hi,
    trying to associate 4 select list where i could display all records from a list linked to an other list.
    1./ Created an item for each select list
    P1_employee_name
    P1_departments
    P1_employee_type
    P1_locations
    2./Set both null and default values to '-1' for each item
    3./Associated these items to source columns in the Region:
    where employee_name=:P1_employee_name
    or :P1_employee_name ='-1'
    and departments=:P1_departments
    or :P1_departments ='-1'
    and ......
    When running the report, couldn't display all records from a given list associated to an other list.
    e.g: Display all emp and type of emp for sales dept in Paris.
    Thks for your help

    I believe the issue is that you need to group your predicates such as:
    where (employee_name=:P1_employee_name
    or :P1_employee_name ='-1')
    and
    (departments=:P1_departments
    or :P1_departments ='-1')
    Also, if you are not already using the "select list with submit" type items, these work great for this case as the page will be submitted when the user changes the value of employeenam and the report will then reflect this change.

  • Returning both raise_application_error and return value from db function...

    Hi ,
    I use Oracle 10g and forms10g.
    I have written a db packaged function such as:
    function fnc_ipologismos_xiliometron(code_poleis_apo_var in varchar2,code_poleis_pros_var in varchar2)
       return number
       is
        apostasi_var ref_apostaseis_poleon.apostasi%type;
        onomasia_pol_apo_var ref_poleis.onomasia%type;
        onomasia_pol_pros_var ref_poleis.onomasia%type;
        begin
         begin
            select onomasia into onomasia_pol_apo_var
              from ref_poleis
              where code_poleis=code_poleis_apo_var;
         end;
         begin
            select onomasia into onomasia_pol_pros_var
              from ref_poleis
              where code_poleis=code_poleis_pros_var;
         end;
         begin
          select apostasi into apostasi_var
           from ref_apostaseis_poleon
           where code_poleis_apo=code_poleis_apo_var and code_poleis_pros=code_poleis_pros_var;
          exception
           when no_data_found
    then
    apostasi_var:=0;
    return apostasi_var;
    raise_application_error(-20015,'a message');
    --return apostasi_var;
    end;      return apostasi_var;
        end;The problem is that when the exception written above (in bold) returns 0 and exits the function.... whereas i want this value to be returned as well as the message in the raise_application_error....
    I call this function in WHEN-VALIDATE-ITEM of a block item... such as:
    if pkg_mod3_general.fnc_ipologismos_xiliometron
    (:mod3_entoli_metakinisis.code_poleis_apo_type_id,:mod3_entoli_metakinisis.code_poleis_type_id)=0
                  and :mod3_entoli_metakinisis.seq_code_meso_metakin_type_id=2
                  then
                    raise form_trigger_failure;
      end if;     When the above condition is true then no message is displayed and the cursor sticks to the item(as the raise_application_error in the db packaged function is after the exit of the function) and when the condition is false then no message is displayed again ... as expected.....
    How is it get the desired result.....- get the message from the raise_application_error and the function returns 0.....?????
    Many thanks,
    Simon

    you cannot RETURN and RAISE a function.
    RETURN ends the function immediately
    RAISE ends the program unit and jumps in the EXCEPTION-Handler, if it exists. Else the function ends

Maybe you are looking for

  • Problem with quicktime movie

    Hi all, I am trying to make some first steps with the video editing in photoshop cs6 but I cant make past stage one....getting a file to open properly. I shot some video on my panasonic gf1. Its a .mov file. When I look at it in bridge, or open it in

  • Images in Outlook 2010 messages disappeared (SOLVED)

    Racking my brain on this one, and tried a ton of things found in googling. I have Outlook 2010 with both a work Microsoft Exchange and personal Gmail IMAP set up, and both have stopped showing pictures embedded in e-mails.  They just show a completel

  • Substr function not working in coldfusion sql

    Hi all, I am using coldfusion 7.0.2 with oracle 10g. I've the following simple query select substr(colname,1,3) from tablename this query works fine if i run it using TOAD or SQLPLUS but when i run this query in coldfusion script i get the following

  • Reader stopped working

    I can't open documents on websites.  When I click on the link, it takes me to a plain white screen with a small purple square in the upper left corner.  I have tried uninstalling and re-installing with no results.

  • Flash Bulilder 4.7 cannot install

         I cannot install Adobe Flash Builder trial version (my pc: Windows 8, 64x, downloaded file FlashBuilder_4_7_LS10_win64.exe) ????